2005.06.21 09:17 "[Tiff] Tiff-Tags and Delphi7 / X and Y RESOLUTION / PHOTOMETRIC", by Matthias Lach

2005.07.21 03:16 "Re: [Tiff] question of understanding / D7 and Var-Types", by Joris Van Damme

" FirstPageYReso,FirstPageXReso: single; "

   TIFFSetField(tifbild, TIFFTAG_XRESOLUTION, FirstPageXReso);
  TIFFSetField(tifbild, TIFFTAG_YRESOLUTION, FirstPageYReso);

just to store the value.

Matthias his problem got solved when we remembered


Seems that we need Single to read the resolution tags with TIFFGetField, and a variable of type Double (as opposed to a direct value, or a variable of other type) to write with TIFFSetField. So the problem is solved on a trial-and-error basis. It's strange though, the TIFFSetField man page says TIFFSetField expects a float for setting the resolution tags, and this is equivalent to a Delphi Single, not a Double. And it's also weird that a direct value doesn't work. If someone has a more thorough understanding of why exactly, we would appreciate more insight.

Joris Van Damme
Download your free TIFF tag viewer for windows here: