Mail Archives: djgpp/1996/12/17/20:28:07
Michael Gensheimer writes:
>Grabber (a tool in allegro) doesn't want to make a palette for
>my PCX files. The example images all have palettes included, so which
>program should I use to give them palettes? I really don't want to code
>in 256 RGB values. By the way, I use Paint Shop Pro if that helps.
The palette is stored in the PCX file along with the image - you just
need to grab it out into the Allegro datafile. First create a palette
object, then load in the PCX file (with the Read Bitmap command), select
the palette object, and use the grab command. This will extract the
palette data from the PCX file, in a format suitable for later being
passed to set_pallete().
If you have several images which need to be displayed simultaneously,
you will need to make sure they all use the same palette. There are
tools around that can do this - look on x2ftp.
/*
* Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
* Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
*/
- Raw text -