Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx007.isp.belgacom.be (inmx007.isp.belgacom.be [195.238.3.89])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id iB96wQrf009312
        for <joris.at.lebbeke@skynet.be>; Thu, 9 Dec 2004 07:58:26 +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 inmx007.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id iB96wCjY028101
        for <joris.at.lebbeke@skynet.be>; Thu, 9 Dec 2004 07:58:14 +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 A61994EAB81; Thu,  9 Dec 2004 01:57:55 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202])
	by xserve.flids.com (Postfix) with ESMTP id C36114EAB5E
	for <tiff@remotesensing.org>; Thu,  9 Dec 2004 01:57:53 -0500 (EST)
Received: by wproxy.gmail.com with SMTP id 71so697476wri
	for <tiff@remotesensing.org>; Wed, 08 Dec 2004 22:57:50 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
	b=U+gM8QoUGI3EpxoH1GSq045hth+9Os77BWk2eBEHFUz/ZvKO95m7lC88nhKDaIX1ZawdjkMY4yTCbouVBBPodh+8UP7MuN6NnkcV1KhXeDwDHWTRethAuhGUVa5CA5g3GSSmWDnoFXuhFO0I6YSrgyPvmPRkAoPUeBjSSBnRoEc=
Received: by 10.54.31.27 with SMTP id e27mr248694wre;
	Wed, 08 Dec 2004 22:57:50 -0800 (PST)
Received: by 10.54.30.56 with HTTP; Wed, 8 Dec 2004 22:57:50 -0800 (PST)
Message-ID: <b353037041208225744965767@mail.gmail.com>
Date: Thu, 9 Dec 2004 12:27:50 +0530
From: Sachin Garg <schngrg@gmail.com>
To: tiff@remotesensing.org
Subject: Re: [Tiff] Q: writing tiled TIFFs
In-Reply-To: <6.2.0.14.2.20041208212744.02dac138@pop.earthlink.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
References: <003701c4dc9d$b2c52fe0$5eb1f551@dfgrrxsknr4e>
	<BDDBEC9A.2C99E%eric.vergnaud@jlynx.com>
	<6.2.0.14.2.20041207212848.02cd6880@pop.earthlink.net>
	<b35303704120801317626cafb@mail.gmail.com>
	<6.2.0.14.2.20041208073835.02cf9be8@pop.earthlink.net>
	<000c01c4dd24$40ed9650$7abaf551@dfgrrxsknr4e>
	<6.2.0.14.2.20041208212744.02dac138@pop.earthlink.net>
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Sachin Garg <schngrg@gmail.com>
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: 8ee00dcb88a670d4d5f50992acc4280c

On Wed, 08 Dec 2004 21:30:24 -0500, Chris Losinger
<losinger@earthlink.net> wrote:
> At 07:48 AM 12/8/2004, you wrote:
> > > i'd just prefer to see a simple explanation of what TIFFWriteTile
> > > expects, what the rules are for tile sizes, what z-order means here, etc..
> >
> >As to TIFFWriteTile, the tile functions are very similar to the strip
> >functions.
> >Except of course that tiles are a rectangular array, top-left,
> >top-not-so-left,..., not-so-top-left, not-so-top-not-so-left,...,bottom-right.
> 
>          if i have a tile size of 256x256 and a 200x200 image, how should i
> fill the tile buffer before calling TIFFWriteTile? LibTiff doesn't give me
> any errors when i go to write it, so i assume it's a legal tile size. but,
> the image pixels are messed up (looks like row length is wrong somewhere).
> 
>          -c

I am "guessing" that you will probably have to write data for 56 extra
pixels after each row.

For example if the bit depth is 8 per channel, and its a rgb image,
then you must be writting 3 bytes for each pixel. So in the case you
describe above, you must be writting 3*200 bytes for each row, now you
will probably have to write 3*56 more NULL bytes after each rows data,
and then write the next rows data again followed by 3*56 NULL bytes
and so on.

-- 
Sachin Garg [India]
http://www.geocities.com/schngrg
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
