On 2018-05-20 11:37:14 -0400, Dennis Lee Bieber wrote: > On Sun, 20 May 2018 12:38:59 +0100, bartc <[email protected]> declaimed the > following: > >Then the /same software/ probably wouldn't work anywhere else. I mean > >taking source which doesn't know or care about what system its on, and > >that operates on a ppm file downloaded from the internet. > > And software that handles binary PPM on a big-endian system probably > won't run on a little-endian system, if said PPM is using a maxval >255 > (meaning each R,G,B takes up two bytes, and said bytes would be seen in > reverse order when moving from one system to the other).
The byte order in PPM files is well-defined.
It is trivial to write a portable C program which reads raw PPM files.
And by "portable" I mean that the same program works on big- or little
endian systems, on ASCII or EBCDIC systems, on systems where 1 byte is
more than 8 bits (as long as the file stores still one octet per byte),
etc.
hp
--
_ | Peter J. Holzer | we build much bigger, better disasters now
|_|_) | | because we have much more sophisticated
| | | [email protected] | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list
