Mail Archives: djgpp/1999/03/08/10:56:31
In article <8D53104ECD0CD211AF4000A0C9D60AE360F7CA AT probe-2 DOT acclaim-euro DOT net>,
djgpp AT delorie DOT com wrote:
> ian_dunbar AT my-dejanews DOT com writes:
> > I have a problem displaying a 256 color bitmap. It is displayed as all the
> > wrong colors.
>
> Your code looks ok, so I'd guess that this is a color format conversion
> problem. What color depth are you using, and what format is your image?
> Are you sure that you are setting the graphics mode before you load
> in the file? If you are loading a paletted graphic for display in
> a truecolor mode, you'll need to disable the automatic color conversion
> and do this yourself before you display it: see the set_color_conversion()
> function in the docs.
>
> Shawn Hargreaves.
It was a color conversion problem. The bitmap was an 8bpp RGB encoded windows
bitmap, and I was just displaying in VGA 320x200x8bpp, so I didn't think that
there would have been any conversion happening, but the dat utility doesn't
seem to store the bitmap at the same bpp as the .bmp file (does it have a
default depth or something?). I added a "-bpp 8" switch to the commands to
store the bitmap & palette and it works fine.
Thanks,
Ian.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
- Raw text -