Output your array b to a file and try to open it with some graphics program.
I bet it won't open. Check if there's no text conversion in between and the
blob is really binary.
Best Regards,
Paulo Soares
----- Original Message -----
From: "Tracy Parsons" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 8:47
Subject: [iText-questions] Retrieve png image from db for display in PDF
> Hi there..
>
> I am new to iText and would like to know if it is possible to retrieve a
> png
> image from the database and create an Image to be displayed in my
> document?
>
> At the moment I get an error saying "Could not find a recognized
> imageformat.". Maybe I am not using the ImgRaw getInstance properly...
> Here is the basic code:
>
> b = rs.getBytes("IMAGE_BLOB");
> com.lowagie.text.Image png = com.lowagie.text.ImgRaw.getInstance(b);
> document.add(png);
>
> Thanks in advance,
> Tracy
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions