Return-Path: <tiff-bounces@remotesensing.org>
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx010.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j66B9tjV022210
        for <joris.at.lebbeke@skynet.be>; Wed, 6 Jul 2005 13:09:56 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 51E0C26C0D50; Wed,  6 Jul 2005 06:15:50 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from mail1.telefax400.de (mail1.telefax400.de [212.185.103.53])
	by xserve.flids.com (Postfix) with ESMTP id B34E026C0D2D
	for <tiff@remotesensing.org>; Wed,  6 Jul 2005 06:15:45 -0400 (EDT)
Received: from mail1 (mail1 [212.185.103.53])
	by mail1.telefax400.de (8.9.3+Sun/8.9.3) with ESMTP id MAA28156
	for <tiff@remotesensing.org>; Wed, 6 Jul 2005 12:15:44 +0200 (MET DST)
Received: from dtagbrg1.telefax400.de ([10.4.2.1])
	by mail1 (MailMonitor for SMTP v1.2.2 ) ;
	Wed, 6 Jul 2005 12:15:44 +0200 (MET DST)
Received: from mlac (mlac [10.99.1.13])
	by dtagbrg1.telefax400.de (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id
	j66AN7K11797
	for <tiff@remotesensing.org>; Wed, 6 Jul 2005 12:23:07 +0200
Message-Id: <200507061023.j66AN7K11797@dtagbrg1.telefax400.de>
From: "Matthias Lach" <Matthias.Lach@Telefax400.de>
To: "'libtiff mailinglist'" <tiff@remotesensing.org>
Date: Wed, 6 Jul 2005 12:18:44 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Thread-Index: AcWBemy5hv/Hc4i0TWO5r5aae7yEkwAl5E8w
In-Reply-To: <a7f98aa71e299684514cd77ab96a808b@quart-edv.de>
Subject: [Tiff] question of understanding / D7 and Var-Types
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 000000000023ceae.00000675
X-MSP-STORE: Wed, 06 Jul 2005 13:10:08 +0200
Status:   

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


_______________________________________________
Tiff mailing list: Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
