AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

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
2007.05.04 12:46 "Re: [Tiff] TIFFSetField and float values", by mikk
2007.05.04 13:02 "Re: [Tiff] TIFFSetField and float values", by Joris Van Damme
2007.05.04 13:13 "Re: [Tiff] TIFFSetField and float values", by Toby Thain
2007.05.04 13:20 "Re: [Tiff] TIFFSetField and float values", by Joris Van Damme
2007.05.04 21:06 "[Tiff] TIFFSetField and float values", by mahmoudi wafa

2007.05.04 13:20 "Re: [Tiff] TIFFSetField and float values", by Joris Van Damme

I would agree... but I suspect other compilers may behave differently. I suspect that passing a float, as per documentation, would work for most, but passing a double will work for all.

In standard C, floats are always promoted to double in function arguments.

Indeed. That's exactly why I think documenting the parameter to be a double instead of a float would work for all, standard C compilers that used to promote the float to double anyway, as well as Borland compilers that seem to fail to do this promotion in the variable list arguments case.

Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html