Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-d.b-one.net (mx-d.one.com [91.198.169.51])
	by mail9.b-one.net (Postfix) with ESMTP id 469B2400470
	for <info@awaresystems.be>; Mon, 19 Oct 2009 19:14:10 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=6 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-d.b-one.net (Postfix) with ESMTP id 8A4F13803E2F
	for <info@awaresystems.be>; Mon, 19 Oct 2009 19:14:09 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id C1B691D18B155;
	Mon, 19 Oct 2009 12:13:35 -0500 (EST)
Received: from mail.sidefx.com (mail.sidefx.com [38.99.137.163])
	by lists.maptools.org (Postfix) with ESMTP id 070191D18DE96
	for <tiff@lists.maptools.org>; Mon, 19 Oct 2009 12:12:36 -0500 (EST)
Received: from [192.168.235.146] (unknown [192.168.235.146])
	by mail.sidefx.com (Postfix) with ESMTP id DFA0E5D340;
	Mon, 19 Oct 2009 13:12:30 -0400 (EDT)
Message-ID: <4ADC9DEE.1010100@sidefx.com>
Date: Mon, 19 Oct 2009 13:12:14 -0400
From: Edward Lam <edward@sidefx.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Horvat Johann <johann.horvat@meduniwien.ac.at>
References: <5035_1255943124_4ADC2BD4_5035_2816823_1_728e5bde1054aabd46737810f7a1787a.squirrel@webmail.meduniwien.ac.at>
	<alpine.GSO.2.01.0910191110430.1964@freddy.simplesystems.org>
In-Reply-To: <alpine.GSO.2.01.0910191110430.1964@freddy.simplesystems.org>
Cc: Tiff List <tiff@lists.maptools.org>
Subject: Re: [Tiff] open/write/close tiff in local buffer instead of using
 file?
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

Bob Friesenhahn wrote:
> If you use TIFFClientOpen() then you can supply your own I/O callbacks 
> in order to use a buffer in memory.  After the TIFF has been written 
> to a memory buffer, you can append it to your MXF file.  There is also 
> the option to use TIFFClientOpen() and have your I/O wrapper functions 
> adjust the file offsets so that a new TIFF appends to the file.  TIFF 
> I/O does seeks and requests the file size so you would need to 
> intercept these requests and lie appropriately.

There's a similar example that can be found under the contrib/stream 
directory in the libtiff source distribution. If you're using C++, then 
you can probably use it directly, calling TiffStream::makeFileStream() 
with an ostrstream of your buffer.

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