comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How to read two-bytes variables from a file saved in Mac?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
How to read two-bytes variables from a file saved in Mac? [message #24707] Mon, 16 April 2001 10:07
Xiong Hu is currently offline  Xiong Hu
Messages: 2
Registered: November 2000
Junior Member
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!

--Xiong
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Fill in a logic image: possible in IDL ?
Next Topic: Re: How to call fortran subroution?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:40:30 PDT 2025

Total time taken to generate the page: 0.00564 seconds