AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2011

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2011.06.30 15:21 "Is it possible to read a large tiff image in portions?", by Hib Eris
2011.06.30 15:45 "Re: Is it possible to read a large tiff image in portions?", by Olivier Paquet
2011.06.30 15:48 "Re: Is it possible to read a large tiff image in portions?", by Bob Friesenhahn
2011.06.30 15:51 "Re: Is it possible to read a large tiff image in portions?", by Steve Mills
2011.06.30 15:52 "Re: Is it possible to read a large tiff image in portions?", by <jcupitt@gmail.com>
2011.06.30 16:02 "Re: Is it possible to read a large tiff image in portions?", by David Burken
2011.06.30 20:16 "Re: Is it possible to read a large tiff image in portions?", by Hib Eris
2011.06.30 20:35 "Re: Is it possible to read a large tiff image in portions?", by David Burken
2011.07.01 04:57 "Re: Is it possible to read a large tiff image in portions?", by Andreas Kleinert
2011.07.01 14:12 "Re: Is it possible to read a large tiff image in portions?", by David Burken

2011.06.30 16:02 "Re: Is it possible to read a large tiff image in portions?", by David Burken

Hib,

On 06/30/2011 11:21 AM, Hib Eris wrote:
> 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.
I'll point you to an example.  Ossim is tile based under the hood.  So 
all of our image readers have one purpose, to stuff a tile of image data 
like 256x256.  Since tiff can be many flavors I'd start at 
ossimTiffTileSource::getTile as it takes multiple paths.

http://trac.osgeo.org/ossim/browser/trunk/ossim/src/ossim/imaging/ossimTiffTileSource.cpp

Hope that helps.

Another option of course would be to link with ossim, open your image 
and call getTile for the rectangle you want.

Hope that helps,
Dave

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