Article View: rec.games.programmer
Article #1116getting the palette from a PCX file
From: s marshall
Date: Mon, 12 Oct 1992 11:26
Date: Mon, 12 Oct 1992 11:26
28 lines
1379 bytes
1379 bytes
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;
Palette=array[0..255] of RGBrec.
I blockread the last 768 bytes of the PCX file into a Palette variable,
and then dump that to the VGA card. To read the Palette from the PCX file
I am using seek(PCXfile,filesize(PCXfile)-768);
blockread(PCXfile,PaletteVar,768); <-record size is 1
Any suggestions as to what the problem might be would be much appreciated.
Steve
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Steve Marshall - University College Swansea Computer Centre
ccsteve@uk.ac.swan.pyr|ccsteve@cybaswan.uucp|ccsteve@uk.ac.swan.vax
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Technical Details
Message-ID:
<1061@cybaswan.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!att-out!rutgers!jvnc.net!yale.edu!think.com!ames!agate!doc.ic.ac.uk!uknet!cf-cm!cybaswan!ccsteveShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!att-out!rutgers!jvnc.net!yale.edu!think.com!ames!agate!doc.ic.ac.uk!uknet!cf-cm!cybaswan!ccsteve From: ccsteve@cybaswan.UUCP (s marshall) Newsgroups: rec.games.programmer Subject: getting the palette from a PCX file Message-ID: <1061@cybaswan.UUCP> Date: 12 Oct 92 11:26:15 GMT Reply-To: ccsteve@pyr.swan.ac.uk (s marshall) Lines: 28