AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.06.20 10:19 "[Tiff] Invert-problem", by Matthias Lach
2005.06.20 11:47 "Re: [Tiff] Invert-problem", by Michel Salvagniac
2005.06.20 15:52 "Re: [Tiff] Invert-problem", by Bob Friesenhahn

2005.06.20 15:52 "Re: [Tiff] Invert-problem", by Bob Friesenhahn

ist me again - and i have still a problem saving my file.

i opend a fax g-3 tiff with LibTif for Delphi (D7).

I open it as 32 bit bitmap and can work and manipulate it if i like ot save it i need to convert it back into 1-bit because all other formats make the outputfile looks jolted.

But - no matter what bit-format i choose, all output is invertet - and i cant find the reason why.

The problem is likely with using the wrong photometric. The choices available are PHOTOMETRIC_MINISBLACK and PHOTOMETRIC_MINISWHITE. Grayscale images will usually be PHOTOMETRIC_MINISBLACK since this is how computer display systems work, but since paper is white, FAX uses PHOTOMETRIC_MINISWHITE. So you should set the photometric to

PHOTOMETRIC_MINISWHITE and make sure that the sense of the bits is inverted to reflect that. In other words, a set bit indicates a black pixel when the photometric is PHOTOMETRIC_MINISWHITE.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/