| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2005.09.13 01:26 "Re: read-by-scan-line buffers full strip, part 2", by Joris Van DammeMark, Mark Pilon wrote: > I still need to handle the problem image - is there some way to > implement a 'null' codec to get me the image data so that I can go > off to the side and decompress it line-by-line? > > or do I even need to implement anything? -- could I just rewrite the > compression type for this image as 'none' ? If I understand correctly that you seek access to the compressed strip/tile data, without LibTiff expanding any of it to a complete uncompressed strip/tile, then I think TIFFReadRawStrip and TIFFReadRawTile may be useful. See http://www.remotesensing.org/libtiff/man/TIFFReadRawStrip.3tiff.html and http://www.remotesensing.org/libtiff/man/TIFFReadRawTile.3tiff.html. Of course, using this method, you'll still have allocated memory of a complete compressed strip/tile. Seems like little gain from the substantial effort of writing your own more streaming decompressors to handle the data 'off to the side'. If you want the offsets/bytecounts of the strips/tiles, so that you can read smaller buffers, feeding it through your custom decompressors a small buffer at the time, and thus further streamlining the process for minimum memory requirements, you could simply use TIFFGetField on the StripOffsets/StripByteCounts/TileOffsets/TileByteCounts tags. For exact datatypes and stuff, see http://www.remotesensing.org/libtiff/man/TIFFGetField.3tiff.html. For more details on the tags themselves, search over at http://www.awaresystems.be/imaging/tiff/tifftags.html. Or am I misunderstanding your need? Joris Van Damme info@awaresystems.be http://www.awaresystems.be/ Download your free TIFF tag viewer for windows here: http://www.awaresystems.be/imaging/tiff/astifftagviewer.html |
|||||||