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
July 2005

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

2005.07.06 10:18 "question of understanding / D7 and Var-Types", by Matthias Lach
2005.07.21 03:16 "Re: question of understanding / D7 and Var-Types", by Joris Van Damme
2005.07.21 14:09 "Re: question of understanding / D7 and Var-Types", by Frank Warmerdam
2005.07.21 14:21 "Re: question of understanding / D7 and Var-Types", by Chris Losinger
2005.07.21 16:13 "Re: question of understanding / D7 and Var-Types", by Joris Van Damme
2005.07.21 16:38 "Re: question of understanding / D7 and Var-Types", by Chris Losinger
2005.07.21 16:47 "Re: question of understanding / D7 and Var-Types", by Frank Warmerdam

2005.07.06 10:18 "question of understanding / D7 and Var-Types", by Matthias Lach

Hello All!

http://199.98.20.129/courses/course_pages/past_courses/EE458/TIFF/

tells me
"
Basic Tags:
[...]
20. XResolution 282 RATIONAL 1
21. YResolution 283 RATIONAL 1
[...]
---
RATIONAL 5 Two LONG values. The first represents the numerator of a
fraction, the second the denominator
"
I still need to write these 2 tags into my file.
So i made these vars single:

" FirstPageYReso,FirstPageXReso: single; "

and read them for the only reaason to keep the reso and writeback
these values as they where read out the original file.
so i did :


OpenTiff:=TIFFOpen(FileListBox1.Filename,'r'); 
    TIFFGetField(OpenTiff,TIFFTAG_XRESOLUTION,@FirstPageXReso);
    TIFFGetField(OpenTiff,TIFFTAG_YRESOLUTION,@FirstPageYReso);

and later 

tifbild:=TIFFOpen(Output, 'w') ;             
  TIFFSetField(tifbild, TIFFTAG_XRESOLUTION, FirstPageXReso);
  TIFFSetField(tifbild, TIFFTAG_YRESOLUTION, FirstPageYReso);

just to store the value.

if i make a output with showmessage(floattostr(FirstPageXReso)) 
i see the correct value of the original file (p.e. "204").

But the definetion above normaly means a value like "204.0" 
if i do so 
( setting the value with a fixed value like
TIFFSetField(tifbild, TIFFTAG_YRESOLUTION, 204.0);
i get a floatingpoint error from delphi....

If i try TIFFSetField(tifbild, TIFFTAG_YRESOLUTION, 204); 
for setting a fixed value the output still shows me a "0".


the file can be written and looks ok, but if i check the values for the reso
with p.e. "AsTiffTagViewer.exe" all i could read is a "0" ZERO.
i tryed a lot allready but cant find my error.

any Hints?

(@Joris: I'll contact You Tuesday ;-) )

---
Mit freundlichen Gruessen

Matthias Lach