- 2010.05.11 15:49 "Re: [Tiff] Tiff with varying bit depths", by Frank Warmerdam
- 2010.05.11 15:58 "Re: [Tiff] Tiff with varying bit depths", by Bob Friesenhahn
2010.05.11 15:49 "Re: [Tiff] Tiff with varying bit depths", by Frank Warmerdam
I currently have a need to read and write TIFF files with a varying bit depth. To be specific, this is a BGR565 image packed into TIFF:
$ tiffdump out.tif
BitsPerSample (258) SHORT (3) 3<5 6 5>
Compression (259) SHORT (3) 1<1>
Photometric (262) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<140>
SamplesPerPixel (277) SHORT (3) 1<3>
RowsPerStrip (278) LONG (4) 1<64>
StripByteCounts (279) LONG (4) 1<8192>
SampleFormat (339) SHORT (3) 1<1>Obviously, the library does not support this, but what are my options if I need to read this file? I'm not too keen to write a tiff-parser myself, unless I really really have to - and - I afraid - I really really have to read this file in one way or another.
Is there a way to get at least hands on the raw stripe data without the lib falling over? Failing that, what is the patch acceptance policy for libTIFF? Would you accept a patch that adds support for this, probably in a limited way?
Thomas,
Have you investigated using TIFFReadRawTile() to read these tiles? At what point does libtiff fail with this file?
I don't anticipate the regular decompression/decoding logic working with such a file in the near future, but I would like to see it be possible to fetch the raw tile/strip data without too much difficulty.
Can you make one of these files available?
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent