On 10/28/10 at 01:18pm, AJ ONeal wrote: > I'm trying to read a bmp header, but the bytes seem to be coming in in the > wrong order (endianness). > > How can I get all of the values I'm reading in from the header in the file > in reverse order?
Take a look at le16toh for the 2 byte values and le32toh for the 4 byte values. Both functions are described in endian(3). -- Byron Clark -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
