PCX files
Loading PCX files -> nothing should be easier, right? well, I'm, i'm having some trouble...
I've got the RLE stuff down and I can draw a square to the screen that has the dimensions of the image, BUT, all of the pixels are the same color.
After loading the header, I fseek(...) to 128 after SEEK_SET, and then just use fread(...) to get my data. It seems as though all of the pixels are the same color when I read them, does anyone think they know whats going on? I of course can give a more detailed description of what I'm doing if you really want it....
edited part: oh yeah, 16bit color, 640x480 screen, writing to back buffer with my own looping pel-by-pel copy thingy, then flipping.
Thanks!
-Sponge99
Edited by - Sponge99 on August 1, 2001 3:21:00 AM
I am using 8 bit depth, which equals 24-bit color, correct?
8-bits per channel, 3 channels, 24-bit color. It isn''t palletized, I think...(i made it in adobe photoshop 5.5)
Sponge99
8-bits per channel, 3 channels, 24-bit color. It isn''t palletized, I think...(i made it in adobe photoshop 5.5)
Sponge99
If your using 8 bit, that IS palettized
And that''s probably where your problem lies, you''re trying to read it wrong. 8 bit means 1 byte per pixel, and that byte corresponds to the color in the PCX file''s palete, which is located in that last 768 bytes of the file if I remember correctly.
And that''s probably where your problem lies, you''re trying to read it wrong. 8 bit means 1 byte per pixel, and that byte corresponds to the color in the PCX file''s palete, which is located in that last 768 bytes of the file if I remember correctly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement