At 6:32 PM -0600 4/28/08, Peter K. Stys wrote:
>At the moment, say I have 1 million UInt16's representing 16-bit per pixel
>image data, stored in BLOB fields in a REALSQLdatabase file. When I save
>this on PPC and then read it on Intel, the UInt16 byte pairs are reversed
>and must be byte-swapped.
Yes, of course. The two million byte string aka blob has no inherent
endianness and so will come out just the way it went in, even when
transferred between different endian platforms.
The endianness only comes into play when you try to interpret some of
those bytes as integers or other numeric types. There's no way that a
database could know what or how you packed the data into the string.
You should be able to easily handle this by putting the string into a
memoryblock and just setting the memoryblock.LittleEndian property to
the current platform endianness.
Regards,
Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|