Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx007.isp.belgacom.be (inmx007.isp.belgacom.be [195.238.3.89])
        by mailst006.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i6U4FuPY008332
        for <joris.at.lebbeke@skynet.be>; Fri, 30 Jul 2004 06:15:56 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx007.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i6U4FlmE015126
        for <joris.at.lebbeke@skynet.be>; Fri, 30 Jul 2004 06:15:51 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id BD99517D02F; Fri, 30 Jul 2004 00:14:43 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from ahk.pu.ru (ahk.pu.ru [193.124.85.198])
	by xserve.flids.com (Postfix) with ESMTP id F0BD917CFDD
	for <tiff@remotesensing.org>; Fri, 30 Jul 2004 00:14:17 -0400 (EDT)
Received: from wg.pu.ru (wg.pu.ru [193.124.85.219])
	by ahk.pu.ru (8.12.11/8.12.9) with ESMTP id i6U4ECPu049225
	for <tiff@remotesensing.org>; Fri, 30 Jul 2004 08:14:12 +0400 (MSD)
	(envelope-from dron@ak4719.spb.edu)
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id EAA09079
	for tiff@remotesensing.org; Fri, 30 Jul 2004 04:14:12 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) with ESMTP id
	i6U44cPf007575
	for <tiff@remotesensing.org>; Fri, 30 Jul 2004 08:04:38 +0400
Received: (from dron@localhost)
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) id i6U44cGB007571
	for tiff@remotesensing.org; Fri, 30 Jul 2004 08:04:38 +0400
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Fri, 30 Jul 2004 08:04:38 +0400
To: tiff@remotesensing.org
Subject: Re: [Tiff] writing to a pipe (better error message needed?)
Message-ID: <20040730040438.GC2967@ak4719.spb.edu>
Mail-Followup-To: tiff@remotesensing.org
References: <20040729170752.1176572159.qww314159@soup.acv.apexcovantage.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20040729170752.1176572159.qww314159@soup.acv.apexcovantage.com>
X-GnuPG-Key: http://www.srces.spb.org/dron/export.home.key
X-Face: "t+se9s~+y~[XUH]L|pmeO3Pt/Q@DNv**S, d@_1-C=}/,
	c%<3Qp]eu!ok<"2lYJm$!9qVcg F?7o*L; |$`6|Q|>Rt-cU%2_y@6tQ|`!Li}TsvZvEKx;
	>fuY=fc(=sX^`7Wmw8%SsR`AvM$a; 0U/eN\ P?B\FTyqD, 0np$U2!*'z_4D,
	VPlFf?bN0&zYf"zF0s!7Tl7?$we)xD0@lL>[h|8bhys0i.g|zLnu@C
	Ti@d]i=[!:j1CB\5/TF[m]`lfHfaqSN[0qn@T3zeosV/[LAss{@p_?],x*j8P_9t[}uHD^X-;
	j~\M! gyTly;fj`}&Y~i{<#bN.#QmkE}#T`dxP.I1\.)_MEN{@#W
User-Agent: Mutt/1.5.6i
X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72
	on ak4719.spb.edu
X-Virus-Status: Clean
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 436fd9fc1ee07dfcded054991f9cf79f

On Thu, Jul 29, 2004 at 05:07:52PM -0400, Jay Berkenbilt wrote:
> There's a 3.5-year-old debian "wishlist" bug that boils down to
> someone wanting to be able to create tiff files to a pipe.  I
> understand the tiff file format well and know that it is full of
> offsets and lengths, making writing a tiff file in one pass impossible
> without potentially caching the whole image in memory, particularly
> when compression is being used.
> 
> The error message that libtiff gives when you try to write to a pipe
> is something like 'Error writing data for field "DocumentName"' (or
> whichever field it's writing).  It might be more clear if TIFFFdOpen
> (or some lower-level function) immediately failed if you use a
> non-seekable file descriptor.

Generally speaking, TIFF file cannot be streamed in all possible cases,
but sometimes we can write an application which can do that. I have
mentioned TIFFCheckpointDirectory() function recently, it can be used to
write TIFF directory before the image data. When you will get the
directory on receiving side it will be simple to read the whole image.
Conclusion: it is possible to write TIFF to pipe using libtiff, but
application should take a care of it. It is not possible to pipe any
existing TIFF file, but when we create a new file we can do that in
the way, adopted for piping.

> I may also mention to the user that the PNG file format was designed
> with writing to a pipe as a design goal, so if this functionality is
> required, they may want to consider that format.

That is true and should be recommended anyway.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
