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
September 2005

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

2005.09.12 21:22 "read-by-scan-line buffers full strip, part 2", by Mark Pilon
2005.09.13 01:26 "Re: read-by-scan-line buffers full strip, part 2", by Joris Van Damme
2005.09.13 15:34 "Re: read-by-scan-line buffers full strip, part 2", by Mark R Olin
2005.09.13 15:58 "Re: read-by-scan-line buffers full strip, part 2", by Joris Van Damme
2005.09.13 16:17 "read-by-scan-line buffers full strip, part 3", by Mark Pilon
2005.09.13 16:54 "Re: read-by-scan-line buffers full strip, part 3", by Joris Van Damme
2005.09.13 17:48 "Re: read-by-scan-line buffers full strip, part 3", by Mark Pilon

2005.09.13 15:34 "Re: read-by-scan-line buffers full strip, part 2", by Mark R Olin

> > 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.3tif
> f.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'.


Joris,

Custom decompression by single scanlines using JPEG would not be possible
since the JPEG DCT algorithm is applied on spatial blocks.

This link gives a good illustration

http://ei.cs.vt.edu/~mm/gifs/DCTcodec.html .

However, Mark P. might be able to decode a series of blocks using the
TIFFReadRawStrip() approach which might yield 8 scanlines at once (greyscale).
I don't know what the organization is for color.

I believe that the DCT is applied to 8x8 blocks in raster order, from top
to bottom, left to right. So to get an 8 line decompressed strip from the
middle of the raw compressed strip, you'd have to first decompress and
discard all compressed data "above" the lines that you wish to get to,
just to get to the right place.

Regards,

Mark O.