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

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

Hello All!

First i need to say a kind "THANK THEE" for helping me out with my newbie problems. I solved the invertproblem with changing the PHOTOMETRIC_MINISWHITH into a MINISBLACK - what ever the problem was - i have a nice looking image now.

For some reason i like to implemetn a check box in my form, that - if ist check change the PHOTOMETRIC-value. So i put a sting "minis" with "PHOTOMETRIC_MINISWHITH" and used

  TIFFSetField(tifbild, TIFFTAG_PHOTOMETRIC, minis);

BUT - that does not work. the outputfile as the value "unknown 26696" as Photometric. I can use variables for the value "TIFFSetField(tifbild, TIFFTAG_IMAGEWIDTH, width)" and it workes fine. why not for Photometric?

other thing/question:

i read

TIFFGetField(OpenTiff,TIFFTAG_XRESOLUTION,@FirstPageXReso)

and

TIFFGetField(OpenTiff,TIFFTAG_YRESOLUTION,@FirstPageYReso),

put it in public variables of cardinal type. i get x= 1129054208 and Y=1128529920 from a file that is x=204 dpi and y= 196 dpi.

if i want to wirte back these values all i get back is ZERO "0" (opend with AsTiffTagViewer).

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

(same values as read from original file)

there must be a little error in reasoning on my side i guess... but.. wehre? :-)

Can Someone please point me into right direction?

thank thee all

Mit freundlichen Gruessen

Matthias Lach