[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to read two-bytes variables from a file saved in Mac?

Hi! Does somebody know how to read the two-bytes variables from a file saved
in Macintosh?

I am trying reading the image data in PC platform. The image data saved in
IPlab in Mac. And I found out the difference of the way the data be saved in
between PC and Mac. For example, a two- bytes integer will be saved like:
0[low byte]1[high byte] in PC platform. But in Mac, it will be saved like:
1[high byte]0[low byte].

So in PC when I try to read a file saved in Mac, I need to read byte by byte
and do transform in the right way to get the right value of each pixel. But
I think it is not a good way. I wonder if there are any "keywords" or
"command" can help me solve this problem directly and efficiently.

Any your suggestion are appreciating!