Re: [iText-questions] PdfContentByteInst.addImage messes up jpg

2010-08-20 Thread fhomasp
Right.. I have "a" solution although I'm unsure wheather it's good enough, perhaps you do know :-) Image image = Image.getInstance(url); if(image.isJpeg()){ if (image.hasICCProfile()) { PdfICCBased icc =

Re: [iText-questions] PdfContentByteInst.addImage messes up jpg

2010-08-20 Thread fhomasp
Hey, I read the discussion you provided, thanks. There is a difference between the House.jpg and my jpg file that's causing a problem. If I construct a BufferedImage with the house.jpg file I get an exception, which would do for me, I'd be able to act on it. However this doesn't happen using m

Re: [iText-questions] PdfContentByteInst.addImage messes up jpg

2010-08-20 Thread Paulo Soares
I suspect you have a RGB image with a CMYK color profile, the profile must match the bytes in the image otherwise you'll have the "insufficient data" error. Have a look at http://thread.gmane.org/gmane.comp.java.lib.itext.general/52049/. Paulo - Original Message - From: fhomasp