ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIFF, Photometric MinIsBlack
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

JonRobertson

USA
41 Posts

Posted - Apr 01 2013 :  12:27:00  Show Profile  Reply
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.

fab

1310 Posts

Posted - Apr 06 2013 :  03:50:25  Show Profile  Reply
Unfortunately I cannot verify this problem without the image. You can send it privately using support email.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: