Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-l.b-one.net (mx-l.one.com [91.198.169.59])
	by mail9.b-one.net (Postfix) with ESMTP id 020E8400122
	for <info@awaresystems.be>; Mon, 13 Apr 2009 18:18:34 +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-l.b-one.net (Postfix) with ESMTP id 609EE1D36210
	for <info@awaresystems.be>; Mon, 13 Apr 2009 18:18:33 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id C15F71D1953B9;
	Mon, 13 Apr 2009 11:17:46 -0500 (EST)
Received: from hermes.med-web.com (hermes.med-web.com [64.186.39.16])
	by lists.maptools.org (Postfix) with ESMTP id A7CAD1D18E5A3
	for <tiff@lists.maptools.org>; Mon, 13 Apr 2009 11:08:24 -0500 (EST)
Received: from [192.168.240.232] (dhcp232.med-web.com [192.168.240.232])
	by mail.med-web.com (Postfix) with ESMTP id E75991F381C5
	for <tiff@lists.maptools.org>; Mon, 13 Apr 2009 12:08:17 -0400 (EDT)
Message-ID: <49E3636E.9030405@pobox.com>
Date: Mon, 13 Apr 2009 12:08:14 -0400
From: Jason Summers <jason1@pobox.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: TIFF mailing list <tiff@lists.maptools.org>
References: <949801310904081356r2528fa98tfefc596b77ccf988@mail.gmail.com>
	<949801310904130750m50f35d0fkb17fbc04b38c5b23@mail.gmail.com>
In-Reply-To: <949801310904130750m50f35d0fkb17fbc04b38c5b23@mail.gmail.com>
X-MIE-MailScanner-Information: Scanned at MIE
X-MIE-MailScanner: Found to be clean
X-MIE-MailScanner-SpamCheck: not spam (whitelisted),
	SpamAssassin (not cached, score=-1.44, required 2,
	autolearn=disabled, ALL_TRUSTED -1.44)
X-MIE-MailScanner-From: jason1@pobox.com
Subject: Re: [Tiff] writing in-memory tiffs
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

Christian Henning wrote:
> Hi there,
> 
> last Wednesday I posted a problem when writing in-memory images, but
> so far, no one replied. Can someone please tell me if the sample
> program I posted is suppose to work?

I don't believe your sample program will work, because you didn't 
implement seek_proc or read_proc or size_proc.

seek_proc is required. Libtiff doesn't necessarily write the bytes in order.

You might get away with having read_proc always fail, provided you never 
write multi-image TIFFs, but I wouldn't rely on that. Unlike other 
libraries, libtiff cannot write to write-only files. And make sure that 
your read_proc fails if there is nothing to read. If it returns bytes 
that were not written, bad things will happen.

I don't know if size_proc is ever called when writing TIFFs, but why 
chance it?

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