Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx009.isp.belgacom.be (inmx009.isp.belgacom.be [195.238.3.146])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id iBALlsj0005128
        for <joris.at.lebbeke@skynet.be>; Fri, 10 Dec 2004 22:47:54 +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 inmx009.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id iBALlc9w027056
        for <joris.at.lebbeke@skynet.be>; Fri, 10 Dec 2004 22:47:40 +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 7067B4F75AB; Fri, 10 Dec 2004 16:47:20 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from cgp.pu.ru (vlan3.cgp.pu.ru [195.70.196.209])
	by xserve.flids.com (Postfix) with ESMTP id 79A2B4F7588
	for <tiff@remotesensing.org>; Fri, 10 Dec 2004 16:47:18 -0500 (EST)
Received: from wg.pu.ru ([193.124.85.219] verified)
	by cgp.pu.ru (CommuniGate Pro SMTP 4.2.5)
	with ESMTP id 39609560 for tiff@remotesensing.org;
	Sat, 11 Dec 2004 00:45:10 +0300
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id VAA14595
	for tiff@remotesensing.org; Fri, 10 Dec 2004 21:47:17 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.12.11/8.12.11/Debian-5) with ESMTP id
	iBALfVP2014881
	for <tiff@remotesensing.org>; Sat, 11 Dec 2004 00:41:31 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.12.11/8.12.11/Debian-5) id iBALfVFF014878
	for tiff@remotesensing.org; Sat, 11 Dec 2004 00:41:31 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Sat, 11 Dec 2004 00:41:31 +0300
To: tiff@remotesensing.org
Subject: Re: [Tiff] Q: writing tiled TIFFs
Message-ID: <20041210214131.GB14687@ak4719.spb.edu>
Mail-Followup-To: tiff@remotesensing.org
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>
	<001701c4ddd7$a0a76a90$9fb4f551@dfgrrxsknr4e>
	<6.2.0.14.2.20041209074326.02d21670@pop.earthlink.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6.2.0.14.2.20041209074326.02d21670@pop.earthlink.net>
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.6+20040722i
X-Virus-Scanned: ClamAV 0.80/623/Thu Dec  9 16:47:37 2004
	clamav-milter version 0.80j on ak4719
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: fc71e1e82ac121ccfe462785841f154d

On Thu, Dec 09, 2004 at 07:48:32AM -0500, Chris Losinger wrote:
> >> 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).
> >
> >Are you properly padding stuff, so as to end up with 256 lines of 256
> >pixels? If not, you ought to.
> 
> yes. i'm copying squares out of my source image into a 256x256 buffer
> (doing what amounts to an image overlay of the source onto the tile
> buffer - so the tile buffer maintains its 256x256 nature and the
> overlayed image only covers a part of the tile buffer). then i pass
> that to TIFFWriteTile.

1. Do you need a TIFFWriteTile() function? Probably
   TIFFWriteEncodedTile() may better suit for your needs.

2. You should use cropped buffer in your case (this is also happens when you
   write the last tile in a strip or column). Data in the buffer will be
   contiguous, i.e. after the end of the first scanline you should start
   the second one without any NULL bytes or so.

						Andrey

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