Received: from mailgate007.isp.belgacom.be (mailgate007.isp.belgacom.be [195.238.5.213])
	by maildelivery002.isp.belgacom.be (Postfix) with ESMTP id B6F84148002
	for <joris.at.lebbeke@skynet.be>; Mon, 30 Jul 2007 15:06:44 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 30 Jul 2007 15:06:43 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l6UCjv2Y016488;
	Mon, 30 Jul 2007 08:46:39 -0400
Received: from toronto2.smartgames.ca (toronto2.smartgames.ca [204.15.192.18])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l6UCjtQj016484
	for <tiff@lists.maptools.org>; Mon, 30 Jul 2007 08:45:55 -0400
Received: from [10.143.176.18] (unknown [10.143.176.18])
	by toronto2.smartgames.ca (Postfix) with ESMTP id CD062D30;
	Mon, 30 Jul 2007 08:48:11 -0400 (EDT)
In-Reply-To: <46ADA0C9.8050608@go2.pl>
References: <7e3058f70707271349l6d5844dcp9f00fc6b4ddaa806@mail.gmail.com>	<789EE892-0A0F-48A9-A72B-F2F4D629A4CF@smartgames.ca>	<7e3058f70707280043y6e293844ydf6b4c93f4acd802@mail.gmail.com>	<C0EC28F7-5784-4D8A-9051-D34507C04A2B@smartgames.ca>	<7e3058f70707281305n73cc7ee3vfc0bcbfe6daab1d2@mail.gmail.com>
	<1F7BD864-4262-4B58-8944-E9BFB40EA70A@smartgames.ca>
	<46ADA0C9.8050608@go2.pl>
Mime-Version: 1.0 (Apple Message framework v752.2)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <395F3C03-93AE-49B6-9AFC-39327213CE4C@smartgames.ca>
Content-Transfer-Encoding: 7bit
From: Toby Thain <toby@smartgames.ca>
Subject: Re: [Tiff] Well,
	How to create a 200x100dpi Tiff file programmatically?
Date: Mon, 30 Jul 2007 09:45:55 -0300
To: mikk <mikk@go2.pl>
X-Mailer: Apple Mail (2.752.2)
Cc: TIFF list <tiff@lists.maptools.org>, mohamad zeinali <delphiboy@gmail.com>
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.000026b9
X-MSP-STORE: Mon, 30 Jul 2007 15:06:44 +0200
Status:   


On 30-Jul-07, at 5:26 AM, mikk wrote:

>> You really do need to RTFM (such as the TIFF spec, along with  
>> libtiff documentation).
>> One starting point: http://www.awaresystems.be/imaging/tiff/ 
>> faq.html#q4
>> --Toby
> The problem is that the spec is not very accurate on that.


The spec has nothing to say about compiler quirks :-)



> As I discussed this issue on this mailing list some time ago (May  
> 2007) with Joris, when using Borland compilers you have to pass  
> argument of type Double to set the values for tags  
> TIFFTAG_XRESOULTION and TIFFTAG_YRESOLUTION, although the spec says  
> that these should be passed as float (or Single - the Delphi  
> equivalent).
>
> So, Mohhamad, you have to try to use local variables of type Double  
> as arguments for TIFFSetField.

What also seems to have confused Mohamad is the indirection that TIFF  
uses for tag values. He seems not to have understood that libtiff  
abstracts this away, so that he doesn't have worry about offsets;  
only to specify the values.

But it's not yet clear whether his file is being written with the  
resolution he intends or not; IMO he should check that with an  
inspection tool like tiffinfo/tiffdump.

Mohamad, you could also try pasting a code snippet here.

--Toby


>
> Hope this helps
>
> Kind regards,
> mikk

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
