Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id 4F57B400220
	for <filtered@awaresystems.be>; Thu, 26 Jan 2012 20:27:39 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-r: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.160.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-pw0-f48.google.com (mail-pw0-f48.google.com [209.85.160.48])
	by mx-r.one.com (Postfix) with ESMTP id BEA74145E7C8
	for <filtered@awaresystems.be>; Thu, 26 Jan 2012 19:27:38 +0000 (UTC)
Received: by pbcc11 with SMTP id c11so1096466pbc.21
        for <filtered@awaresystems.be>; Thu, 26 Jan 2012 11:27:37 -0800 (PST)
Received: by 10.68.211.166 with SMTP id nd6mr7217667pbc.125.1327606057686;
        Thu, 26 Jan 2012 11:27:37 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.142.51.2 with SMTP id y2cs70800wfy;
        Thu, 26 Jan 2012 11:27:37 -0800 (PST)
Received: by 10.68.130.201 with SMTP id og9mr7403131pbb.61.1327606056897;
        Thu, 26 Jan 2012 11:27:36 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.249 as permitted sender) client-ip=91.198.169.249;
Received: by 10.68.18.75 with POP3 id u11mf1387805pbd.13;
        Thu, 26 Jan 2012 11:27:36 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id AFD48400220
	for <info@awaresystems.be>; Thu, 26 Jan 2012 20:22:02 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-r.one.com (Postfix) with ESMTP id 5649A1440ECE
	for <info@awaresystems.be>; Thu, 26 Jan 2012 19:22:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 3587C1EDAC1;
	Thu, 26 Jan 2012 14:20:55 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id C8A421EDAB5
	for <tiff@lists.maptools.org>; Thu, 26 Jan 2012 13:24:05 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	q0QIO30h017592; Thu, 26 Jan 2012 12:24:03 -0600 (CST)
Date: Thu, 26 Jan 2012 12:24:03 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Christopher Cameron <ccameron@qnx.com>
In-Reply-To: <CB46EC9C.20B8%ccameron@qnx.com>
Message-ID: <alpine.GSO.2.01.1201261216280.18942@freddy.simplesystems.org>
References: <CB46EC9C.20B8%ccameron@qnx.com>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
	(blade.simplesystems.org [65.66.246.90]);
	Thu, 26 Jan 2012 12:24:03 -0600 (CST)
Cc: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Subject: Re: [Tiff] TIFFClientOpen() output stream/encoding behaviour
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

On Thu, 26 Jan 2012, Christopher Cameron wrote:
> 
> I am noticing however that libtiff will occasionally attempt to seek back to data, and occasionally ask for the size of the
> file, while encoding. Is there a way to disable this random access for output streams? Perhaps by enabling something where
> libtiff will cache the metadata that has already been written? Or by forcing libtiff to write all the metadata first,
> followed by the image data?

I don't think that it is possible to do what you request other than by 
doing a full dry-run with all the data because otherwise it is not 
possible to know the TIFF offsets.  If no compression is used, then it 
is technically possible to compute all offsets in advance.

If libtiff does not know the final content of the metadata, then it 
can not write it first.

If you have sufficient memory, then you could write the TIFF to 
memory, and then write the content of the memory to the output stream.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
