www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/17/20:28:07

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro palette (PCX)
Date: Tue, 17 Dec 1996 19:12:53 +0000
Organization: None
Lines: 21
Distribution: world
Message-ID: <fhtU$EA1CvtyEwox@talula.demon.co.uk>
References: <32B42DDF DOT 7492 AT tfs DOT net>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019