2011.06.30 15:21 "[Tiff] Is it possible to read a large tiff image in portions?", by Hib Eris

2011.06.30 20:35 "Re: [Tiff] Is it possible to read a large tiff image in portions?", by David Burken

Hi,

On 06/30/2011 04:16 PM, Hib Eris wrote:

On Thu, Jun 30, 2011 at 6:02 PM, David Burken<dburken@comcast.net> wrote:

On 06/30/2011 11:21 AM, Hib Eris wrote:

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

>> 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. can be many flavors I'd start at Since tiff

ossimTiffTileSource::getTile as it takes multiple paths.

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

Thanks for the example. It seems to me that there is no higher level function in libtiff to accomplish what I want and that most people solve this by resorting to using low level functions like TIFFReadScanline(), TIFFReadEncodedStrip(), and TIFFReadTile().

I would like to avoid that. Using those functions means putting knowledge about the tiff format into my application. I would like to keep my application simple, I am no tiff expert and I would like to shield myself and other maintainers of my application from any tiff specification intrinsics. In my opinion, libtiff is the place for tiff expertise, not in the applications using it.

Wouldn't it be a good idea to implement a function like ossimTiffTileSourcce::getTile in libtiff?

Maybe call it TIFFReadRGBARectangle(). It seems lots of applications could benefit from it.

That would be a good addition. All the higher level libraries that link with libtiff write their own(like ossim) so it would save a lot of duplicate code. Tiff's come in many flavors though... The low levelness of libtiff is a good thing, i.e. small, portable, fast, but as you bring up it lack some things. I'm not sure how you'd start to get that accepted in the library. I guess this mailing list maybe. I'd vote for it...

Take care,

Dave