Are you using the latest release? If you are, post the
corrupted image.

--- Vd K <[EMAIL PROTECTED]> wrote:

> Hi,
>  
> I am trying to get an instance of Image object using
> the following code
>  
>   Image img = Image.getInstance(buffer);
>  
> I am reading the contents of an Image file into a
> byte[] array and passing it as a parameter to the
> above method in the variable "buffer". It works fine
> if I use a normal image. Incase my image is corrupt
> it executes forever at the following line:
>  
> com.lowagie.text.Image.skip(Unknown Source)
>  
> Please find below the details of the thread dmp when
> the above code is executed with a corrupt image
>  
>  at
>
java.io.ByteArrayInputStream.skip(ByteArrayInputStream.java:189)
>  - waiting to lock <0x9ef85b30> (a
> java.io.ByteArrayInputStream)
>  at com.lowagie.text.Image.skip(Unknown Source)
>  at com.lowagie.text.Jpeg.processParameters(Unknown
> Source)
>  at com.lowagie.text.Jpeg.<init>(Unknown Source)
>  at com.lowagie.text.Image.getInstance(Unknown
> Source)
>  
> Is there any way we can ientify the image is corrupt
> before invoking the "getInstance()" method?  Any
> help is appreciated.
>  
> Thanks
> Deepak
>  
>  
>  
> 
>               
> ---------------------------------
> Discover Yahoo!
>  Stay in touch with email, IM, photo sharing & more.
> Check it out!



                
__________________________________ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to