AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2012.06.16 16:37 "[Tiff] about the TIFFSetField usage", by He Yang
2012.06.16 17:00 "Re: [Tiff] about the TIFFSetField usage", by Frank Warmerdam
2012.06.17 19:47 "Re: [Tiff] Tiff Digest, Vol 97, Issue 5", by He Yang
2012.06.18 13:15 "Re: [Tiff] Tiff Digest, Vol 97, Issue 5", by Olivier Paquet

2012.06.16 17:00 "Re: [Tiff] about the TIFFSetField usage", by Frank Warmerdam

On 12-06-16 09:37 AM, He Yang wrote:

Hi
    I am a beginner, an try to learn how to use TIFFSetField usage, I
try to use TIFFSetField as below

      TIFFSetField(tif, tag, count, vlaue_ptr);

it works, but the value is not correct when I try to use TIFFGetField, the count = 1, and the vlaue_ptr is the pointer of a short value, which value equal to 16, but when I read it back it become 1. What I did wrong?

He Yang,

The tricky thing with TIFFSetField() is that the calling sequence is very much determined by which tag you are getting and setting. The library attempts to provide a "natural" calling sequence depending on the nature of the tag but this means you need to lookup the particular tag in the TIFFSetField man page to see the appropriate arguments. Likewise with TIFFGetField. So you will need to be more specific about the tag you are talking about.

Best regards,
--
---------------------------------------+--------------------------------------

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://home.gdal.org/warmerda
and watch the world go round - Rush    | Geospatial Software Developer