[gdal-dev] Get Image Endianness

Frank Warmerdam warmerdam at pobox.com
Wed Feb 3 13:03:10 EST 2010


Alejandro Mostovoi wrote:
> Hi All,
> 
> I need to know the image endianness.
> I search for in api's help and list but can't find anything.
> 
> Any idea?

Alejandro,

As mentioned by others the on-disk endianess varies by format and sometimes
by file in a format.  The endianess of data returned by the GDAL API is always
local machine order. So if you read a big endian file on a little endian
system, the RasterIO() calls will return the data to the application in little
endian byte order.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list