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.17 19:47 "Re: [Tiff] Tiff Digest, Vol 97, Issue 5", by He Yang

On 6/17/2012 12:00 PM, tiff-request@lists.maptools.org wrote: > Send Tiff mailing list submissions to

> tiff@lists.maptools.org
>
> To subscribe or unsubscribe via the World Wide Web, visit

> or, via email, send a message with subject or body 'help' to
> tiff-request@lists.maptools.org
>
> You can reach the person managing the list at
> tiff-owner@lists.maptools.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tiff digest..."
>
>
> Today's Topics:
>

>     1. Re: about the  TIFFSetField usage (Frank Warmerdam)
>     2. another problem about TIFFSetField  Precision (He Yang)
>     3. Re: another problem about TIFFSetField  Precision

> (Andreas Kleinert)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 16 Jun 2012 10:00:36 -0700
> From: Frank Warmerdam<warmerdam@pobox.com>
> Subject: Re: [Tiff] about the TIFFSetField usage
> To: tiff@lists.maptools.org
> Message-ID:<4FDCBBB4.8050600@pobox.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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.

Hi Frank

I am trying to set the EXIFTAG_EXPOSURETIME, which is a TIFF_RATIONAL, is there are way to make sure the forward /backward conversion are always consistent. Does libtiff provide a way to make sure the rational to float and float to rational, But from my tracing, I found the precision was lost during read back from the disk file not from the memory?

Best regards,