Tiff Analyzer
Posted
by Kevin
on Stack Overflow
See other posts from Stack Overflow
or by Kevin
Published on 2009-07-09T13:39:14Z
Indexed on
2010/05/26
0:21 UTC
Read the original article
Hit count: 690
I am writing a program to convert some data, mainly a bunch of Tiff images. Some of the Tiffs seems to have a minor problem with them. They show up fine in some viewers (Irfanview, client's old system) but not in others (Client's new system, Window's picture and fax viewer). I have manually looked at the binary data and all the tags seem ok. Can anyone recommend an app that can analyze it and tell me what, if anything, is wrong with it?
Also, for clarity sake, I'm only converting the data about the images which is stored seperately in a database and copying the images, I'm not editting the images myself, so I'm pretty sure I'm not messing them up.
UDPATE: For anyone interested, here are the tags from a good and bad file:
BAD
Tag Type Length Value
256 Image Width SHORT 1 1652
257 Image Length SHORT 1 704
258 Bits Per Sample SHORT 1 1
259 Compression SHORT 1 4
262 Photometric SHORT 1 0
266 Fill Order SHORT 1 1
273 Strip Offsets LONG 1 210 (d2 Hex)
274 Orientation SHORT 1 3
277 Samples Per Pixel SHORT 1 1
278 Rows Per Strip SHORT 1 450
279 Strip Byte Counts LONG 1 7264 (1c60 Hex)
282 X Resolution RATIONAL 1 <194> 200 / 1 = 200.000
283 Y Resolution RATIONAL 1 <202> 200 / 1 = 200.000
284 Planar Configuration SHORT 1 1
296 Resolution Unit SHORT 1 2
Good
Tag Type Length Value
254 New Subfile Type LONG 1 0 (0 Hex)
256 Image Width SHORT 1 1193
257 Image Length SHORT 1 788
258 Bits Per Sample SHORT 1 1
259 Compression SHORT 1 4
262 Photometric SHORT 1 0
266 Fill Order SHORT 1 1
270 Image Description ASCII 45 256
273 Strip Offsets LONG 1 1118 (45e Hex)
274 Orientation SHORT 1 1
277 Samples Per Pixel SHORT 1 1
278 Rows Per Strip LONG 1 788 (314 Hex)
279 Strip Byte Counts LONG 1 496 (1f0 Hex)
280 Min Sample Value SHORT 1 0
281 Max Sample Value SHORT 1 1
282 X Resolution RATIONAL 1 <301> 200 / 1 = 200.000
283 Y Resolution RATIONAL 1 <309> 200 / 1 = 200.000
284 Planar Configuration SHORT 1 1
293 Group 4 Options LONG 1 0 (0 Hex)
296 Resolution Unit SHORT 1 2
© Stack Overflow or respective owner