I am not sure if the bug is in iText, or why, but the problem is clear.

When you added the watermark, you color converted your Gray JPEG into an RGB 
JPEG.  BUT in the PDF, the watermarked version is STILL identified as GRAY - 
which is why the funny display...

Leonard


On 4/23/09 11:19 AM, "Stéphane Vilboux" <[email protected]> wrote:

Hello,

I noticed a problem while processing JPEG image in a iText document.  Some
of the generated PDF files look ugly with only a part of the JPEG magnified
with white and black stripes (see wm.pdf).

These JPEG files are preprocessed using ImageMagick in order to add a
watermark.  I think this problem happens because of the embedded EXIF data
in the JPEG files.  JPEG images without embedded data (using IM -strip
option) work great.

My question is : shouldn't iText ignore these buggy metadata in order to
show a nice JPEG image instead of this trash ?

Attached are the original JPEG (image.jpg), the IM preprocessed JPEG
(wm.jpg) and the generated PDFs (image.pdf, wm.pdf) with the piece of code
to build them.

Thanks a lot.

Regards,

--
Stéphane Vilboux
Software Engineer
ETAI



--
Leonard Rosenthol
PDF Standards Architect
Adobe Systems Incorporated
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to