Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-r.b-one.net (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id 0EF5140024C
	for <info@awaresystems.be>; Mon, 28 Mar 2011 21:35:36 +0200 (CEST)
Received: by mx-r.b-one.net (Postfix, from userid 106)
	id 029A857011D7; Mon, 28 Mar 2011 21:35:35 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-r.b-one.net (Postfix) with ESMTP id 013E520A6A71 for
 <info@awaresystems.be>; Mon, 28 Mar 2011 21:35:34 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 7798F86B8B; Mon, 28 Mar 2011
 14:33:25 -0500 (EST)
Received: from moutng.kundenserver.de (moutng.kundenserver.de
 [212.227.126.186]) by lists.maptools.org (Postfix) with ESMTP id 4A16986A12
 for <tiff@lists.maptools.org>; Mon, 28 Mar 2011 14:32:40 -0500 (EST)
Received: from [192.168.0.102] (dslb-084-063-043-236.pools.arcor-ip.net
 [84.63.43.236]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP
 (Nemesis) id 0ML7th-1Q4ZIF3RJJ-000NBN; Mon, 28 Mar 2011 21:32:38 +0200
Message-ID: <4D90E253.70302@ar-kleinert.de>
Date: Mon, 28 Mar 2011 21:32:35 +0200
From: Andreas Kleinert <info@ar-kleinert.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.15)
 Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <4D90D1D7.3070100@coppice.org>
In-Reply-To: <4D90D1D7.3070100@coppice.org>
X-Enigmail-Version: 1.1.1
X-Provags-ID: V02:K0:y/NlhaKOKH8k7EuVUQH+4VEo+x4hU4UdvNkLew8yxyX
 S17KvYNr3L5aJJMUIE6XN+YzXNpQpeHZXhcc0n/h8jDcvzyNGR
 MsnSh9mQF3cMK37Ia2HXE/C4VeXQIjULIVWsB5PjKFIRdXP/4U
 loWpMAl4aNT6gMoDyWSP6nF2+qYmxjR/JvfC0IWzJHt0z8FpIm
 oX37uLirPLSoO6kbvEyh5bILYZmajgXZINMhnUwimg=
Subject: Re: [Tiff] TIFFReadCustomDirectory and TIFFWriteCustomDirectory
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Hi,

when writing a new directory, TIFFWriteCustomDirectory() puts it to
the end of the file. Furthermore, the offset return value (in &offset)
seems to be equivalent to tif->tif_nextdiroff - as the new directory
is the last one in the file, zero IMHO makes perfect sense?!

I just wonder if the API intentionally was designed this way, or
whether it's a bug. However, when just following this logic then
TIFFCurrentDirOffset() should return what you expect.

Is there any error output?

BR,
Andreas

> Hi,
> 
> I have started using TIFFReadCustomDirectory to access some special IFD 
> blocks in TIFF-FX files. That seems to be working OK, but I can't find a 
> way to do the opposite, and write similar special IFD blocks. I found 
> TIFFWriteCustomDirectory, but it doesn't seem to be documented, and 
> doesn't seem to be a corollary of TIFFReadCustomDirectory. When I try 
> calling TIFFWriteCustomDirectory(tiff_file, &offset); it always returns 
> zero for the offset, and I can't seem to find a related block of tags in 
> the resulting file, if I do a hex dump of that file. Can anyone help?
> 
> Steve
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
