delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/19/16:34:28

From: "Ethan Giordano" <lostreality AT geocities DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: why would my bitmap distort colors badly!?
Date: Thu, 16 Oct 1997 17:15:34 -0400
Organization: Cybernex Inc.
Lines: 24
Message-ID: <62601j$r76$1@news.cybernex.net>
NNTP-Posting-Host: 207.198.146.79
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

all i want to do is display a bitmap ( 24-bit Windows format ). it shows up
in all the wrong colors. i've tried all the color depths, 15, 16, 24, 32,
and 24bit seems to work the best although it is still far off. The bitmap
has approx. 56,000 colors. Help!!

-Ethan


#include "allegro.h"
void main ( void )
{
        BITMAP          *theBitmap;
        PALETTE         thePalette;
        allegro_init();
        install_keyboard();
        set_color_depth ( 24 );
        set_gfx_mode ( GFX_AUTODETECT, 640, 480, 0, 0 );
        theBitmap = load_bmp ( "bitmap.bmp", thePalette );
        set_palette ( thePalette );
        draw_sprite ( screen, theBitmap, 0, 0 );
        while ( !keypressed() );
}


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019