2007.05.04 11:51 "[Tiff] TIFFSetField and float values", by mikk

2007.05.04 12:18 "Re: [Tiff] TIFFSetField and float values", by Andrey Kiselev

On Fri, May 04, 2007 at 01:51:02PM +0200, mikk wrote:

I'm fighting with saving TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION into a TIFF file.

AFAIK TIFFSetField is supposed to have 32 bit float as 3rd parameter and I pass such type of parameter to TIFFSetField. The tag value is saved (the tag is added to the IFD), but always has value of 0.0 instead of passed parameter.

How do you checking result? The common mistake here is to read Resolution value into integer variable, but it should be float one, i.e.

float xres;
TIFFGetField(tif, TIFFTAG_XRESOLUTION, &xres);

Best regards,

Andrey

--
Andrey V. Kiselev
ICQ# 26871517