I try to make a monochrome tiff image to transparent with MakeMask() in a
PDF.

It works on a CCITTT6 Tiff image, However when I do with a PackedBit Tiff
Image,
Its color was inverted after img.MakeMask(), and the content become
transparent.

Then I try to trace with iTextSharp's Source code,
and I found the function GetTiffImageColor() in
iTextSharp.text.pdf.codec.TiffImage
have something strange as below

if (photometric == TIFFConstants.PHOTOMETRIC_MINISWHITE)
   img.Inverted = true;

As I know,photometric MINISWHITE is the default setting that when a bit is
0, it show as "WHITE".
and MINISBLACK will show as "BLACK". 
Thus I modify the photometric to PHOTOMETRIC_MINISBLACK, and everything work
now.

Is it a bug?



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Color-Inverted-after-MakeMask-of-a-Packedbit-TIFF-image-tp4656903.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to