Mail Archives: djgpp/1997/05/29/17:21:31
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 -