|
-
July 15th, 2011, 04:44 AM
#1
Loading a bitmap in-code with XPM file
So here's the deal: I'm trying to load a few bitmaps from within my program's executable, i.e. without loading them from outside files. I looked around for a while for a simple way to do this, and the simplest way seems to be with XPM files. I converted the bitmaps to XPM and included them in my code, but then I realized... I have no idea what to do with it.
It seems to just define a static char array, with information on the colors and whatnot. So how can I convert it into a bitmap within my program?
The code for the XPM files looks a bit like this:
static char *SQUARE_xpm[]={
"180 180 2 1",
" c #FF00FF",
"0 c #FFFFFF",
<pixel information>
};
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|