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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIFF, Photometric MinIsBlack

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
JonRobertson Posted - Apr 01 2013 : 12:27:00
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.
1   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Apr 06 2013 : 03:50:25
Unfortunately I cannot verify this problem without the image. You can send it privately using support email.