Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx017.isp.belgacom.be (inmx017.isp.belgacom.be [195.238.2.129])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id j25Jjx9Q018684
        for <joris.at.lebbeke@skynet.be>; Sat, 5 Mar 2005 20:46:02 +0100
        (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 inmx017.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j25JjjuQ010345
        for <joris.at.lebbeke@skynet.be>; Sat, 5 Mar 2005 20:45:47 +0100
        (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 8D69B10F5170; Sat,  5 Mar 2005 14:45:31 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from scooby.simplesystems.org (scooby.simplesystems.org
	[65.66.246.67])
	by xserve.flids.com (Postfix) with ESMTP id 1136C10F514D
	for <tiff@remotesensing.org>; Sat,  5 Mar 2005 14:45:29 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by scooby.simplesystems.org (8.12.10+Sun/8.12.10) with ESMTP id
	j25JjRAi016756; Sat, 5 Mar 2005 13:45:27 -0600 (CST)
Date: Sat, 5 Mar 2005 13:45:27 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@blade.simplesystems.org
To: warmerdam@pobox.com
Subject: Re: [Tiff] Bogus StripByteCounts field
In-Reply-To: <931f8ea905030511163a230596@mail.gmail.com>
Message-ID: <Pine.SOC.4.60.0503051341400.8945@blade.simplesystems.org>
References: <Pine.SOC.4.60.0503051157310.8945@blade.simplesystems.org>
	<931f8ea905030511163a230596@mail.gmail.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: tiff@remotesensing.org
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: 7330f0e6aa4c122df893e29dac33b62f

On Sat, 5 Mar 2005, Frank Warmerdam wrote:
>
> You might look into TIFFWriteCheck().  I call it like this
> but I think it is only needed when I haven't even started
> writing any imagery yet.
>
>        TIFFWriteCheck( hTIFF, TIFFIsTiled(hTIFF),
>                           "GTiffDataset::Crystalize");

It seems that TIFFWriteCheck() is called for free as the first step of 
TIFFWriteScanline:

#define WRITECHECKSTRIPS(tif, module)                           \
         (((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),0,module))

int
TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t 
sample)
{
         static const char module[] = "TIFFWriteScanline";
         register TIFFDirectory *td;
         int status, imagegrew = 0;
         tstrip_t strip;

         if (!WRITECHECKSTRIPS(tif, module))
                 return (-1);

Of course the data is compressed so it may be that not everything is 
known until the last scanline is written.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
