Return-Path: <tiff-admin@remotesensing.org>
Received: from inav008.isp.belgacom.be (inav008.isp.belgacom.be [195.238.2.78])
        by six.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i2G8hLOf005517
        for <joris.at.lebbeke@skynet.be>; Tue, 16 Mar 2004 09:43:21 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from inmx006.isp.belgacom.be (inmx006.isp.belgacom.be [195.238.2.106])
        by inav008.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-AV-2.02) with ESMTP id i2G8hAqY031947
        for <joris.at.lebbeke@skynet.be>; Tue, 16 Mar 2004 09:43:14 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by inmx006.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i2G8gxhb003148
        for <joris.at.lebbeke@skynet.be>; Tue, 16 Mar 2004 09:43:00 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i2G8eJl20630;
	Tue, 16 Mar 2004 03:40:19 -0500
Received: from ahk.pu.ru (ahk.pu.ru [193.124.85.198])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i2G8dal20597
	for <tiff@remotesensing.org>; Tue, 16 Mar 2004 03:39:36 -0500
Received: from wg.pu.ru (wg.pu.ru [193.124.85.219])
	by ahk.pu.ru (8.12.9p2/8.12.9) with ESMTP id i2G8dYqv056966
	for <tiff@remotesensing.org>; Tue, 16 Mar 2004 11:39:34 +0300 (MSK)
	(envelope-from dron@ak4719.spb.edu)
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id IAA24124
	for tiff@remotesensing.org; Tue, 16 Mar 2004 08:39:34 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 i2G8Pv69021666
	for <tiff@remotesensing.org>; Tue, 16 Mar 2004 11:25:57 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) id i2G8Pv8L021661
	for tiff@remotesensing.org; Tue, 16 Mar 2004 11:25:57 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
To: Tiff mailing list <tiff@remotesensing.org>
Subject: Re: [Tiff] libtiff and streams
Message-ID: <20040316082557.GA20344@ak4719.spb.edu>
Mail-Followup-To: Tiff mailing list <tiff@remotesensing.org>
References: <BAY1-DAV38i4u6LbosM00026558@hotmail.com> <p0521060abc7bbefda1cb@[153.32.48.223]> <4056430A.9050509@cox.net> <001601c40aef$b46891f0$568388d9@dfgrrxsknr4e> <40565AB0.8000200@cox.net> <006001c40afb$8cde8980$d2f988d9@dfgrrxsknr4e> <4056B420.FE5127FA@oce.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4056B420.FE5127FA@oce.nl>
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.3i
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Tue, 16 Mar 2004 11:25:57 +0300
X-RAVMilter-Version: 8.4.3(snapshot 20030212) (inav008.isp.belgacom.be)
X-UIDL: b1609168d6e98b43b059096c906f3db8

On Tue, Mar 16, 2004 at 09:00:32AM +0100, Rob van den Tillaart wrote:
> So if you want to do streaming you should have a TIFF_2_TIFF-F
> normalizer in the front of the pipeline and every filter in the
> pipeline should write according to TIFF-F. But as stated in the RFC
> the filters should be able to read non TIFF-F conforming TIFF format
> to be more generic. 

And to place IFD in front of image data it should be enough to call
TIFFCheckpointDirectory() after setting all tags. Something like:

    out = TIFFOpen("out.tif", "w");
    TIFFSetField(out, TIFFTAG_IMAGEWIDTH, image_width);
    TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, bpp);
    TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, spp);
    TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
    TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photo);
    TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
    TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(out, 0));

    TIFFCheckpointDirectory(out);

    for (i = 0; i < image_height; i++)
        TIFFWriteScanline(out, buf + i * image_width * spp, i, 0);

    TIFFClose(out);

Just a suggestion fro those, who want to create TIFFs, suitable for
sequental access.

						Andrey

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