1994.08.23 14:10 "Re: TIFF photometric question", by Adrian Phillips
We are converting a raw group 3 fax message embedded in another to postscript holding the messages on disk in compressed (g3 or g4) format. We use pbm's g3topbm to convert to pbm, pnmtotiff to convert to tiff, and then tiff2ps to convert to postscript for printing.
Why not just use fax2tiff?
After the pnmtotiff, the tiff images have photometric min-is-black - the images we're originally scanned in with white background and black foreground. When the last version of tiff2ps is used the images come out thus, but if the new version 3.3 is used, the images come out reversed. I interpret min-is-black to mean that this reversing should take place (TIFF spec says WhiteIsZero/BlackIsZero) - is this correct?
Sounds like pnmtotiff is setting the Photometric tag incorrectly. It should be MinIsWhite instead of MinIsBlack. The change between v3.2 and v3.3 was to eliminate the use of the Photometric tag in the G3+G4 decoders. This is according to the spec (though contrary to my intuition, but that's neither here nor there). Basically G3/G4-encoded data is defined to be MinIsWhite (i.e. you the run codes are inherently encoded to mean white or black independent of any Photometric tag value). In v3.2 the library interpreted the run codes according to the value of the Photometric tag while in v3.3 it always assigns a 0/1 value according to the CCITT spec.
Your can switch to fax2tiff or change pnmtotiff to emit a different Photometric tag value.
This is a coninuation of this problem. Please excuse my lack of TIFF knowledge. I changed pnmtotiff to set min-is-white but now (using alpha15) the maps come out black! I checked with tiff2ps and tiffgt and its definitely looking white on black. Now, is this white on black info. in the TIFF "lines" and saying min-is-white just makes it use whats there (and min-is-black reversing this) or is this a problem somewhere else? I would like to use fax2tiff but the fax info is packed within a message, g3topbm skips over leading info. until a fax message is found which makes life easier.
= Adrian Phillips at | BUT any thoughts in this are purely =
= The Norwegian Meteorological | my own and have nothing to do with =
= Institute | this establishment, thankfully. =
= Net: email@example.com | Phone: 47 22 96 32 09 Fax: 47 22 96 30 50