2001.02.07 17:00 "Re: Tag types", by Frank Warmerdam
I'm running the following code:
int32 height = 0;
int32 width = 2048;
. .
.
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height);Expecting the tags to be set as longs, but they are being set as short.
Lyle,
Skimming the code I see imagew width and image length are only written as longs if they actually exceed 64K. I assume this is to maintain maximum compatibility with older TIFF readers that only support shorts. Is this a problem for you? I imagine you could fudge this in TIFFWriteDirectory() within tif_dirwrite.c if you really wanted to force longs to be written.
Best regards,
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent
Editor's note: This mail was not originally archived, and has been reconstructed from quotes.