Mail Archives: djgpp/1997/12/09/17:18:12
Jean-Sebastien Payette writes:
>How do I save a (allegro) bitmap to a file in a raw format???
However you like! Write out whatever header information you need,
followed by all the pixels from the image. To load it back in, read your
header, call create_bitmap() to make an object of the required size, and
then read the pixel values back into it. Look at the Allegro .pcx and
.bmp load/save routines for an example...
[...]
>The author say that there is some other stuff in the struct but don't
>tell what??
You can look in the sources if you really need to know, but be warned
that the innards of the structure are liable to change from one version
to the next. You don't need all that crap when saving an image, though:
it is just the width, height, color depth, and pixels that are
important...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Pigs use it for a tambourine" - Frank Zappa
- Raw text -