Re: PCX & GIF loader
- Posted by Michael Bolin <michaeltom at GEOCITIES.COM> Apr 13, 1997
- 854 views
> Well, I havent received an error using your routine, but noticed a small bug > when loading a 640X480, 256 color PCX file. Your loader decoded and > displayed the file correctly, but the palette was mixed up. (Have you ever se en > bright red trees on purple grass, with blue clouds in a purple sky?). Anyway, > I'm attaching the pcx file, so let me know if it displays in the same wierd > colors > for you. Also, I'm using the Test.ex file provided by Robert Craig, but > with the > line <s = load_gif("title.gif")> changed to <s = load_pcx("tutorial.pcx")>. A ll > other lines are the same. > > James Powell Actually, the bug isn't in my routine. It's in the Test.ex file Robert Craig wrote. The RGB palette values range from 0-255, just like read_bitmap(), but the all_palette() command expects them to range from 0 to 63, so you must use a line like this: all_palette(image[1]/4) which Robert Craig forgot to do. :) Regards, Michael Bolin