2001.02.21 18:05 "G4 colors (b/w or w/b ?)", by Chris Losinger

2001.02.21 18:05 "G4 colors (b/w or w/b ?)", by Chris Losinger

hi,

i'm having some trouble telling when a G4 TIFF is black on white vs. white on black. the images that are giving me trouble have these tags set:

TIFFTAG_BITSPERSAMPLE = 1
TIFFTAG_SAMPLESPERPIXEL = 1
TIFFTAG_EXTRASAMPLES = 0
TIFFTAG_PLANARCONFIG = 1
TIFFTAG_PHOTOMETRIC = 1 (min = black)
TIFFTAG_COMPRESSION = 4

TIFFReadRGBAImage reads them OK and so does my special g4 code, but the colors are reversed. Wang's Imaging stuff displays the images correctly.

so, i'm wondering, does anyone know what kind of magic Wang's stuff could be doing to get the colors right? someone here suggested maybe Wang is simply counting pixels and setting white to the color with the most pixels (since these are faxes).

-c