4 ms·
I will try this format next time I write a simple image processing program. Piping with the converters is way nicer than linking against libpng. PPM is OK but t
by blt 11y ago
I will try this format next time I write a simple image processing program. Piping with the converters is way nicer than linking against libpng. PPM is OK but this format is so dead simple I can commit it to memory. Big endian seems anachronistic though, why?
- nsajko 11y ago> Big endian ... ? http://geekandpoke.typepad.com/geekandpoke/2011/09/simply-explained-1.html http://geekandpoke.typepad.com/geekandpoke/2011/09/simply-ex... :)
- frign 11y agoNowadays, most computers use Little Endian, however, that might change in the future. Also, there's no justification to write software only for one endianness due to speed(tm) or something. Learn to use the interfaces provided by the system (htons(),htonl(),ntohs(),ntohl(),...) and when you specify interchange formats, specify an endianness. Which one it actually is doesn't matter, there's not too much magic happening in the background anyway. Those people claiming "Little Endian Master Race" might probably jump on the Big Endian bandwaggon as soon as it became the majority for some reason. In fact though, writing endian independent code is the way to go.
- blt 11y agoOf course, but right now almost every machine uses x86 or ARM and I want to write a throwaway image processing program. It just seems like a weird choice because the format is almost effortless to use otherwise. You gotta pick one endianness, why not pick the one that's on every machine right now?