[Haskell-cafe] Data.Binary Endianness
aneumann at inf.fu-berlin.de
Mon Sep 10 05:24:41 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
I try to write a Windows Bitmap File using Data.Binary, but I have some
For example, the internet states, that the magic number, that puts 'BM'
in the first two bytes of the file is 19778. But when I
> put (19778::Word16)
I get 'MB' instead. I read on the german Wikipedia, that bmp uses little
endian encoding, but Data.Binary uses big endian. Obviously this can't work.
Is there a way to switch endianness? Or at least a function that
converts between the two?
I looked at the Data.Binary Haddock documentation, but found nothing
Thanks in advance,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Haskell-Cafe