Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Premature end of JPEG file

843807Mar 16 2006 — edited Apr 5 2006
Hi ,

I am trying to load an image into my application for processing with the
following piece of code:
Image iEcranBuffer = getImage(new URL(getCodeBase + "Image.jpg"));

Sometimes I try to load a corrupt jpeg, I get the message "premature end of jpeg file" in the console window.

However, I cannot catch this exception, so I assume that it is caught
internally and logged as such.

How do I get rid of this error message in my console? I would like to be able to catch it or retrieve the good part of the jpeg and change the other one with transparent pixel.

Thanks in advance,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2006
Added on Mar 16 2006
4 comments
599 views