If I have a very large TIFF that is tiled how would I go about reading the tiles one by one?
I need this to be efficent as possible.
Currently I'm opening the file and croping to get essentially a block of data to process.
Given that many large images are tiled I would like to read the data in the native tile/block size. If I read in a different block size to the native block size I would almost certainly cause more data to be read and decompressed than I need too.
How would I be able find the native tile/block size?
How would I then read a Tile of data efficently?
Thanks
Damian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I have a very large TIFF that is tiled how would I go about reading the tiles one by one?
I need this to be efficent as possible.
Currently I'm opening the file and croping to get essentially a block of data to process.
Given that many large images are tiled I would like to read the data in the native tile/block size. If I read in a different block size to the native block size I would almost certainly cause more data to be read and decompressed than I need too.
How would I be able find the native tile/block size?
How would I then read a Tile of data efficently?
If you want to take advantage of tiles then you should use libtiff
directly or use a library (e.g. GDAL, vips) which requests tiles from
libtiff on demand.
GraphicsMagick reads all of the tiles into a linear raster
representation and so the entire image needs to be read and converted
before you can use it.
Hi,
If I have a very large TIFF that is tiled how would I go about reading the tiles one by one?
I need this to be efficent as possible.
Currently I'm opening the file and croping to get essentially a block of data to process.
Given that many large images are tiled I would like to read the data in the native tile/block size. If I read in a different block size to the native block size I would almost certainly cause more data to be read and decompressed than I need too.
How would I be able find the native tile/block size?
How would I then read a Tile of data efficently?
Thanks
Damian
On Sat, 30 Jul 2016, Damian Dixon wrote:
If you want to take advantage of tiles then you should use libtiff
directly or use a library (e.g. GDAL, vips) which requests tiles from
libtiff on demand.
GraphicsMagick reads all of the tiles into a linear raster
representation and so the entire image needs to be read and converted
before you can use it.
Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/