I'm looking for a raw image file format as simplistic as PGM, but encoded in binary, so that I can write pixels in bursts. I've searched over Wikipedia and Google and found none that didn't start to have complex headers and such. Can anybody recommend me such a type of a file format?
One easy way is to use the PGM format itself, in 'P5' (binary) mode. See PGM format from the Netpbm documentation. Set maxVal
to 255, to use the full 8 bit range.
This is probably the most common format for PGM, as it is extremely easy and fast to both read and write.