From: Michal Mertl Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem with Allegro Date: Fri, 14 Mar 1997 12:07:31 +0100 Organization: a Customer of EUnet Czechia Lines: 44 Message-ID: References: NNTP-Posting-Host: prg.traveller.cz Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Tue, 11 Mar 1997, Shawn Hargreaves wrote: > Michal Mertl writes: > >I tried to export the screen into both BMP and TGA files following the > >example in allegro.doc for saving palette, but it seems that resulting > >image has still different palette (blue is not blue..). > > Can you post an example of the code you are using to do this? > Here it is. #include "allegro.h" int main() { PALETTE pal; BITMAP *bmp; char *buf="test.bmp"; int i; allegro_init(); install_keyboard(); i=set_gfx_mode(GFX_AUTODETECT,800,600,0,0); if (i<0) { allegro_exit(); printf("Graphics initialization error: %s\n",allegro_error[i]); return(1); } bmp=create_sub_bitmap(screen,0,0,800,600); for (i=0;i<16;i++) rectfill(screen,i*30,0,(i+1)*30,100,i); get_palette(pal); save_bitmap(buf, bmp, pal); readkey(); return(0); } It seems like there is a bit more blue than red and green, cause white is very light blue and others also seems affected. ///\ /\\\ || ///\ /\\\ Michal Mertl /// \/ \\\ /// \/ \\\ /---\ MiMe AT EUnet DOT cz /// \\\ || /// \\\ |---' /// \\\ || /// \\\ \---/