Article View: rec.games.programmer
Article #1214Re: getting the palette from a PCX file
From: Southern
Date: Wed, 14 Oct 1992 02:27
Date: Wed, 14 Oct 1992 02:27
22 lines
1115 bytes
1115 bytes
In article <1061@cybaswan.UUCP> ccsteve@pyr.swan.ac.uk (s marshall) writes: >I have recently been developing a graphics library for the PC, and have >come across a problem manipulating PCX files. > >I can load in the image succesfully, but cannot get the palette to set >correctly. > >My palette is of the form > >RGBrec=record > red,green,blue:byte >end; > ..... You nearly have it! Everything is perfect except that you didn't go through and divide each RGB value by 4. Run through the entire 768 bytes and divide each byte in the array and that should do it. If that doesn't do enough than I could mail you some code that I wrote to set the palette. southern@Mailbox.syr.edu
Technical Details
Message-ID:
<1992Oct13.222746.20558@newstand.syr.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!psinntp!psinntp!newstand.syr.edu!rodan.acs.syr.edu!southernReferences:
<1061@cybaswan.UUCP>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!psinntp!psinntp!newstand.syr.edu!rodan.acs.syr.edu!southern From: southern@rodan.acs.syr.edu (Southern) Subject: Re: getting the palette from a PCX file Message-ID: <1992Oct13.222746.20558@newstand.syr.edu> Organization: Syracuse University References: <1061@cybaswan.UUCP> Date: Tue, 13 Oct 92 22:27:46 EDT Lines: 25