delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/29/17:21:31

Message-Id: <3.0.32.19970529161151.0091eca0@dataplusnet.com>
Date: Thu, 29 May 1997 16:18:03 -0500
To: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
From: "Michael M." <michaelm AT dataplusnet DOT com>
Subject: Re: Problems With Displaying Graphics
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0

I found my error!  In Adobe Photoshop, I accidently saved it in a 24-bit
pallete, not 256.  Now everything is working correctly.

Thanks!
Mike


At 08:49 PM 5/28/97 PDT, Andrew Crabtree wrote:
>I would try error checking all the calls to see if any fail.
> 
>> void main(int argc, char *argv[])
>  ^^^^ should be int
>> {
>>    BITMAP *buffer;
>>    PALLETE the_pallete;
>> 
>>    start_up();	
>Where is this code?
>>    display_copyright();		// Displays my name
>>    
>>    set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);     // SVGA mode
>Check for error here
>>    
>>    buffer = create_bitmap(50,50);	// Creates a 50 by 50 bitmap
>>    clear(buffer);			// Clears newly made bitmap
>>    buffer = load_bitmap(argv[1], the_pallete);	//loads the file into buffer
>check for error here too
>>    set_pallete(the_pallete);
>>    
>>    blit(buffer, screen, 0, 0, 5, 5, 640, 480);	//Blits buffer to screen
>>    
>>    readkey();
>>    destroy_bitmap(buffer);
>>    exit(0);
>     ^^^ return 0
>> }
>> 
>> --=====================_864889811==_
>> Content-Type: application/octet-stream; name="0001.pcx"
>> Content-Transfer-Encoding: base64
>> Content-Disposition: attachment; filename="0001.pcx"
>> 
>>
CgUBCAAAAAAxADEASABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>>
AAAAAAAAAAADMgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>
>Please don't post binary files.  This is mirrored to a mailing list.  
>
>Andrew
>
>
>
>
>
>
>
>
>
Michael J. Matczynski
michaelm AT dataplusnet DOT com
http://www.dataplusnet.com/~michaelm/

- Raw text -


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