🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1124

Re: getting the palette from a PCX file

#1124
From: John A. Slagel
Date: Tue, 13 Oct 1992 15:17
20 lines
1301 bytes
ccsteve@cybaswan.UUCP (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.

>Any suggestions as to what the problem might be would be much appreciated.


     Steve- I think your problem is this:  A .PCX file stores the RGB 
     intensities in the range of 0-255.  However, when you set the VGA
     DACs, the values can only be from 0-64.  So, you need to run through
     your array of RGB values and divide them by 4 before sending 'em
     to the VGA palette registers.  This should solve it.

-- 
------------------------------------------------------------------------
  John A. Slagel, email: jas37876@uxa.cso.uiuc.edu
Technical Details
Message-ID: <Bw2Fto.BD@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
References: <1061@cybaswan.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
Newsgroups: rec.games.programmer
Subject: Re: getting the palette from a PCX file
Message-ID: <Bw2Fto.BD@news.cso.uiuc.edu>
Date: 13 Oct 92 15:17:45 GMT
Article-I.D.: news.Bw2Fto.BD
References: <1061@cybaswan.UUCP>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Lines: 20