1999.11.24 14:42 "byte order of >8bpp data", by Frank Warmerdam
Folks,
I am trying to read a big-endian 16 bits per sample image on a little endian system, and it seems that libtiff isn't swapping the data into little endian order for me in TIFFReadTile() (or presumably TIFFReadStrip()).
My questions are:
- Am I wrong? Is libtiff swapping it, but I am missing it somehow?
- Libtiff handles byte order issues for tags and non-image data like colour tables automatically. Should it also handle byte ordering for image data?
- If it were to handle it, are the TIFFReadRawTile1() and TIFFReadRawStrip1() functions the appropriate location to update? An alternate form of this question is, do decompressors return image data in local system byte order or the byte order of the underlying tiff file?
Clearly, if the handling of byte swapping is changed in libtiff, the new release will have to go out with a substantial warning as it will break applications that handling the byte swapping themselves.
Best regards,
---------------------------------------+--------------------------------------
I set the clouds in motion - turned up | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent