Black and White photometirc interpretation

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
sathish

Black and White photometirc interpretation

Post by sathish »

I have a TIFF images, some of which have a photometric interpretation value of 0, and some have a value of 1. Depending on the value, the TIFF either displays correctly, or with black and white reversed (black background with white text).
i have to upload the TIFF image to server.
while uploading i have to check whether its a normal TIFF or TIFF with photometric interpretation.
how to check???
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Black and White photometirc interpretation

Post by magick »

ImageMagick does not expose the photometric interpretation. Instead, look for a program called tiffinfo that returns that attribute.
sathish

Re: Black and White photometirc interpretation

Post by sathish »

thanks for ur reply.
tiffinfo returns the attributes of all types of tiff images.
First i want to know whether its a normal TIFF, or with black and white reversed (black background with white text) before uploading the TIFF.
how to find the TIFF structure?
any sample code??
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Black and White photometirc interpretation

Post by magick »

Try this command:
  • identify -debug coder image.tif
It should list the photometric interpretation of the image.
sathish

Re: Black and White photometirc interpretation

Post by sathish »

i want the code in c#.net to find the photometric interpretation of the image.

is it possible??
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Black and White photometirc interpretation

Post by magick »

The photometric information is not available from ImageMagick at this time.
sathish

Re: Black and White photometirc interpretation

Post by sathish »

while scanning a document, sometimes the document scanned as negative image(i.e, with black backgound and with white text). i changed the scanner settings and tried, but occassionally it happens.
Any way to avoid this.??
how to handle this..?
Post Reply