Mail Archives: djgpp/2000/06/16/07:03:48
Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comremovebullcr_p> wrote:
> Actually, a binary format such as PNG would probably be better. IIRC,
> a PGM (portable gray map) file is really a C source file.
No, it isn't. You're confusing PGM and XBM/XPM there. The latter
really are C sourcefiles (i.e. you can just #include <image.xbm> in a
C program, and the image will be compiled in).
PGM and its brothers are extremely simple format. I actually doubt
that any simpler, while still self-contained file format for pixel
images could possibly be invented. They contain of just 3 elements:
1) a 'magic string' so you can see what type of file it is
2) size and bit-depth of the image, as human-readable
numbers.
3) the uncompressed image content, either in human-readable
numbers, too, or as raw binary data.
Wether PNG or some other, more 'advanced' file format can be an
alternative to the simplicity of PBM is a question of application. If
storage space essentially doesn't matter, while parsing and generation
speed of image data is of key importance, PBM may well outperform
every other file format.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -