Reply-To: "James Arthur" From: "Arthur" To: "DJGPP Mailing List" , "Qin" Subject: RE: - How put a image whit only one file ?- Date: Wed, 9 Sep 1998 16:58:20 +0100 Message-ID: <000201bddc0a$aa532000$894b08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: <6srhq4$lc5$1@talia.mad.ibernet.es> Importance: Normal Precedence: bulk > How can i put a image on the screen (320x200) without a bmp > or dat file, > only with a exe file? > I have Allegro but i don't know how do it. > Anybody have a sprite editor that give a file in c format for put > the image > on the screen? If you can output the binary data of the BITMAP structure to a file, you may be able to cut and paste that data into a header file - perhaps in the form of an array of unsigned chars. Simply point to that data with a cast. For example if it's in an array called image_data[], BITMAP *picture; picture = (BITMAP *)image_data; Since you didn't load the image or use create_bitmap, there is no need to use destroy_bitmap. Oh, and this won't save any palette data. There is an easier way. There's a program which will append a dat file to the end of an exe file. It's called exedat and is in the tools folder. Also see example program ex34.exe. HTH James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819