Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-i.b-one.net (mx-i.one.com [91.198.169.56])
	by mail9.b-one.net (Postfix) with ESMTP id 3E19640013B
	for <info@awaresystems.be>; Thu, 30 Jun 2011 17:42:50 +0200 (CEST)
Received: by mx-i.b-one.net (Postfix, from userid 106)
	id 2DF2562CE85; Thu, 30 Jun 2011 17:41:56 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-i.b-one.net (Postfix) with ESMTP id 595D462CE60 for
 <info@awaresystems.be>; Thu, 30 Jun 2011 17:41:56 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 319E886F1D; Thu, 30 Jun 2011
 10:40:23 -0500 (EST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com
 [209.85.212.44]) by lists.maptools.org (Postfix) with ESMTPS id 7C5E686F64
 for <tiff@lists.maptools.org>; Thu, 30 Jun 2011 10:21:50 -0500 (EST)
Received: by vws12 with SMTP id 12so1720425vws.3 for
 <tiff@lists.maptools.org>; Thu, 30 Jun 2011 08:21:50 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.109.134 with SMTP id hs6mr2966873vdb.139.1309447310310;
 Thu, 30 Jun 2011 08:21:50 -0700 (PDT)
Received: by 10.52.167.199 with HTTP; Thu, 30 Jun 2011 08:21:50 -0700 (PDT)
Date: Thu, 30 Jun 2011 17:21:50 +0200
X-Google-Sender-Auth: jS6g-1td09MTH_wAFux11TyC29M
Message-ID: <BANLkTinfaMjCs58CZ__OsOSPdX9phovkyA@mail.gmail.com>
From: Hib Eris <hib@hiberis.nl>
To: tiff@lists.maptools.org
Subject: [Tiff] Is it possible to read a large tiff image in portions?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Hi,

I am trying to handle large tiff files using libtiff, for example, an
image of size 13244 x 18724 pixels.
When I use
int TIFFReadRGBAImage(TIFF *tif, u_long width, u_long height, u_long
*raster, int stopOnError),
then the "raster" must be 13244 x 18724 x 4 = 991922624 bytes.
That is almost 1 GB and that is too much for my computer.

To avoid this, I would like to read and process the image in pieces,
how should I do this with libtiff?

I noticed
int TIFFReadRGBATile(TIFF *tif, uint32 x, uint32 y, uint32 *raster),
but that seems to only work for tile-based tiff images. I would like
to have a solution for all tiff images, not only tile-based ones.

Thanks,

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