AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2012

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2012.06.17 00:18 "another problem about TIFFSetField Precision", by He Yang
2012.06.17 07:56 "Re: another problem about TIFFSetField Precision", by Andreas Kleinert

2012.06.17 07:56 "Re: another problem about TIFFSetField Precision", by Andreas Kleinert

E.g. ensure that float and double are of same size?

-------- Original Message  --------
Subject: [Tiff] another problem about TIFFSetField  Precision
From: He Yang <he-yang@live.com>
To: tiff@lists.maptools.org
Date: 17.06.2012 02:18

> 
>   I want set a rational field,  the value is 1/1250,
>   I first compute the value use two doubles 1 and 1250, and then convert 
> the value to float, which is 0.0007999999998
> and use TIFFSetField,  then I immediately use TIFFGetField to read the 
> value out,  and the result is a float value which
> is correct, but after i write the tiff to file and read the file back, 
> then I use the TIFFGetField, the value become
> 0.00079999999821, which likes a value compted use two float 1 and 
> 1250.   Is there another method can set the rational value with more 
> accurate result?
> 
> Thanks