I have a TIFF created by ImageLib (SkyLine Tools). Some of the properties:
BitsPerSample: 1
Compression: CCITT 1D (CCITT RLE)
Photometric: 1 (MinIsBlack)
When I view the image in ImageEnView, it shows black content on a white background. However, when I view the image in some other applications, it has white content on a black background (sometimes called inverted or negative).
I looked at the source in tiffilt.Decompress1, and it appears that Photometric is applied correctly. So I decided to see what the file itself contained. I modified Decompress1 to build a count of the zero/one values read. I added this code after the call to GetNextLine and immediately before the case inv statement (which would invert the values):
for w := 0 to brow - 1 do
if zbuf[w] = 1 then
Inc(iOnes)
else
Inc(iZeros);
The result was 1,878,994 zeros and 4,206 ones. Considering that Photometric = 1, I'm wondering why ImageEnView shows mostly white pixels.
I think based on the content of this TIFF, ImageEnView is showing it incorrectly. But I don't know why. Or if it is showing it correctly, what tag/property is causing Photometric to be ignored?
Unfortunately, the image contains private patient health information (PHI), so I can't easily send it to you. Any suggestions or guidance you have would be appreciated.