Received: from mailgate001.isp.belgacom.be (mailgate001.isp.belgacom.be [195.238.6.86])
	by maildelivery012.isp.belgacom.be (Postfix) with ESMTP id A3B0D254002
	for <joris.at.lebbeke@skynet.be>; Fri, 27 Jul 2007 09:27:19 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 27 Jul 2007 09:27:19 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l6R7E8Sa014043;
	Fri, 27 Jul 2007 03:14:49 -0400
Received: from smtp.kreisbote.de (smtp.kreisbote.de [195.243.114.61])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l6R7Dh96014037
	for <tiff@lists.maptools.org>; Fri, 27 Jul 2007 03:13:44 -0400
Received: from mail.kreisbote.de (m8.merkur-online.de [195.243.114.8])
	by smtp.kreisbote.de (Postfix) with ESMTP id 26BC63000E
	for <tiff@lists.maptools.org>; Fri, 27 Jul 2007 09:13:41 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by mail.kreisbote.de (Postfix) with ESMTP id 1016818322D
	for <tiff@lists.maptools.org>; Fri, 27 Jul 2007 09:13:41 +0200 (CEST)
Received: from mail.kreisbote.de ([127.0.0.1])
	by localhost (mail.kreisbote.de [127.0.0.1]) (amavisd-new, port 10027)
	with ESMTP id 07179-08 for <tiff@lists.maptools.org>;
	Fri, 27 Jul 2007 09:13:39 +0200 (CEST)
Received: from mail.kreisbote.de (localhost [127.0.0.1])
	by mail.kreisbote.de (Postfix) with ESMTP id DA82D17E59C
	for <tiff@lists.maptools.org>; Fri, 27 Jul 2007 09:13:39 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v752.2)
Message-Id: <2F50F054-753C-41F8-BD47-559B5833CCD2@kreisbote.de>
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
To: tiff@lists.maptools.org
From: Oliver Geisen <oliver.geisen@kreisbote.de>
Date: Fri, 27 Jul 2007 09:13:39 +0200
X-Mailer: Apple Mail (2.752.2)
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	l6R7Dh96014037
Subject: [Tiff] Scanline-Interface
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
Content-Transfer-Encoding: quoted-printable
X-UIDL: 000000000023ceae.0000269f
X-MSP-STORE: Fri, 27 Jul 2007 09:27:19 +0200
Status: RO

Hello,

as far as i know the function
   int TIFFReadScanline(TIFF *tif, tdata_t buf, uint32 row, tsample_t =20
sample)
can only handle subsequent lines (no random access).

If find this irritating because the the function name and the 'row' =20
param suggest that there may be an random access.
   int TIFFReadNextScanline(TIFF *tif, tdata_t buf, tsample_t sample)
would be more intuitive?!

What will happen if:

   - the TIFF is compressed and has only 1 strip of large data? Will =20
libtiff read the whole strip into memory to access the lines?
   - one give a non-sequential line number as row-param?

Maybe:

   - TIFFReadScanline could random access lines, even if data is =20
compressed using this algo:
     strip =3D (row / rps);  // leads in the absolute strip (do -1 to =20
get an offset)
     stripsize =3D TIFFStripSize(tiff);
     TIFFReadEncodedStrip(tiff, strip, stripdata, stripsize);
     stripline =3D (row % rps);  // get the line# inside the strip
     linesize =3D TIFFScanlineSize(tiff);  // get the size of one line
     offset =3D (stripline-1) * linesize;  // offset from stripdata to =20
begin of line
     return (stripdata + offset);  // return pointer to wanted line


Oliver Geisen
Systemadministrator
_____________________________
Kreisboten Verlag M=FChlfellner KG
82362 Weilheim i. Ob.
Tel. 0881/686-904
Fax 0881/686-74
Sitz Weilheim, AG M=FCnchen, HRA 64016, p.h.G.:
Kreisboten-Verlag Verwaltungsgesellschaft mbH,
Weilheim, AG M=FCnchen, HRB 119773,
Gesch=E4ftsf=FChrer: Dr. Dirk Ippen, Dr. Gerd Waldenmaier




_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
