BBS: Inland Empire Archive Date: 08-10-92 (13:10) Number: 139 From: SCOTT WUNSCH Refer#: NONE To: CRAIG RANDLE Recvd: NO Subj: PCX problem Conf: (2) Quik_Bas
All committed a murder on 7 August 1992!
Craig Randle's dieing scream was this:
CR> Below I have a program for viewing PCX's. It
CR> brings up the PCX fine, but the palette for the picture is
CR> the default for QB and the colors come up screwed..
CR> If any VGA wizzes out there can see whats wrong in
CR> this picture could you please correct it and send me a
CR> message.. This program is free to be used by anyone in any
CR> way (not that its very usefull in this form)..
Here is an excerpt from The QBNews volume 1, issue 5 that should
handle the palette part:
________O_/____________________/ Cut \____________________\_O_________
O \ \ Here! / / O
'Getting the .PCX palette info by Dwain Goforth
DIM ByteStr AS STRING * 1 'Colour data is in bytes
OPEN FileName$ FOR BINARY AS #1 'Open the PCX file
SEEK #1, 17 'Position to start of palette info
FOR K = 0 TO 15 'Probably should be 255 for mode 13
GET #1, , ByteStr 'Get the red byte for colour K
Red = ASC(ByteStr) * 64 \ 256
GET #1, , ByteStr 'Get the green byte for colour K
Green = ASC(ByteStr) * 64 \ 256
GET #1, , ByteStr 'Get the blue byte for colour K
Blue = ASC(ByteStr) * 64 \ 256
PALETTE K, (65536 * Blue) + (256 * Green) + Red 'Set colour K
NEXT K
________O_/____________________/ Cut \____________________\_O_________
O \ \ Here! / / O
Hope this helps!
> Scott \\'unsch <
... My other compiler is a Lamborghini!
___ Blue Wave/QWK v2.10
--- Maximus/2 2.01wb
* Origin: The Green Zone - Regina, Sask, Canada (1:140/23)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET