AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2001.12.17 11:47 "Newbie need help! Please!", by Juergen May
2001.12.17 16:31 "Re: Newbie need help! Please!", by Joel Schumacher
2001.12.17 18:39 "RE: Newbie need help! Please!", by Kari Poysa
2001.12.18 00:52 "Re: Newbie need help! Please!", by Takao Matsuda
2001.12.18 01:08 "(Correction)Re: Newbie need help! Please!", by Takao Matsuda

2001.12.17 18:39 "RE: Newbie need help! Please!", by Kari Poysa

Juergen,

The data type for the X and Y resolution is rational. The rational data type is constructed of a 4 byte unsigned LONG integer - the numerator - followed by another 4 byte unsigned LONG integer - the denominator. This way fractional numbers can be described as well as integer values. Your example has bytes "0 45 198 192" or 3,000,000 as the numerator and "0 0 39 16" or 10,000 as the denominator. Dividing the numerator by the denominator makes 300 as you expected. It may be rare to see values other than 1 on the denominator, but it is possible.

--- Kari ---