AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2012.06.15 16:55 "[Tiff] about TIF_RATIONAL SIZE", by He Yang
2012.06.15 17:03 "Re: [Tiff] about TIF_RATIONAL SIZE", by Frank Warmerdam
2012.06.15 17:08 "Re: [Tiff] about TIF_RATIONAL SIZE", by Olivier Paquet

2012.06.15 17:08 "Re: [Tiff] about TIF_RATIONAL SIZE", by Olivier Paquet

On Fri, Jun 15, 2012 at 12:55 PM, He Yang <he-yang@live.com> wrote: > Hi guys

In the tiff.h, the comments says the TIF_RATIONAL is 64bit, but in the return value of is 4 bytes which is 32 bit. Why? > tif_dirinfo.c,

Which is correct?

Are you referring to the value in _TIFFDataSize()? If so, the comment above the function should explain it. Basically, rationals are stored as 2 32-bit integers but in the libtiff API and internal structures, they're 32-bit floats. Conversion is done in tif_dirread.c and tif_dirwrite.c

Olivier