2001.12.18 00:52 "Re: Newbie need help! Please!", by Takao Matsuda
Hello Juergen.
First of all, it would be easier to understand if you write figures in Hex format, I think. ie. 00 FF 2D EC...
I'm a newbie and have a problem understanding the TIFF data structure.
I need to get the resolution of a bi-level TIFF image but can't seem to get the value. I know the resolution is 300 so I'm expecting to find contiguous bytes with the values 1 and 44 (decimal).
Now, if I'm right, the value bytes in the tag 282 (x resolution) act as a pointer. In my instance, the values are as follows -
1 26 - Tag 282
0 5 - Rational type
0 0 0 1 - Count
0 0 0 182 - ???I don't understand what 182 means!? Is this an offset from the start of the file?
Yes.
If so, the value from 182 are -
0 45 198 192
0 0 39 16
0 45 198 192
0 0 39 16
They are
00 2D C6 C0
00 00 27 10
2DC6C0 (3000000) is a denominator and
2710 (10000) is a molecule
2DC6C0 (300000) / 2710 (10000) = 12C (300)
And the second combination of 00 2D C6 C0 and 00 00 27 10 are for Y resolution, I guess.
Does this help?
Takao