Compiling images statically Topic is solved
Compiling images statically
Hi all,
I would like to know if there is a method to compile images within a program..
like this, it won't be necessary a .bmp file for example..
Thanks,
Selles
I would like to know if there is a method to compile images within a program..
like this, it won't be necessary a .bmp file for example..
Thanks,
Selles
-
- Super wx Problem Solver
- Posts: 307
- Joined: Fri Oct 08, 2004 8:21 am
- Location: Area 51
- Contact:
For a cross platform solution, you can look at XPM images. Those are compiled right into your C++ program under all platforms.
- Santiago
http://www.metalogicsw.com
http://www.metalogicsw.com
- tierra
- Site Admin
- Posts: 1355
- Joined: Sun Aug 29, 2004 7:14 pm
- Location: Salt Lake City, Utah, USA
- Contact:
Yes, it works pretty close to the same as XPMs:Vexator wrote:is there a cross-platform solution for other file formats like png? (for alpha map support)
http://wxwiki.org/Embedding_PNG_Images
-
- Super wx Problem Solver
- Posts: 307
- Joined: Fri Oct 08, 2004 8:21 am
- Location: Area 51
- Contact:
Selles,selles wrote:Thank you peoples,
I'm very happy for the help!!! !!!
Selles
You have selected your thank you note as the assisting answer
Please assign the accepted answer/assisting answer to one or more of the messages above which you found helpful.
- Santiago
http://www.metalogicsw.com
http://www.metalogicsw.com
Re: Compiling images statically
You can find an example of compiling XPM images directly into the binary itself and use it with wxWidgets in my file manager, Jaffm. It's at http://jaffm.binary.is. I can't remember where I got the code myself, but I probably looked it up in the image sample that comes with wxWidgets although I frankly can't remember.selles wrote:Hi all,
I would like to know if there is a method to compile images within a program..
like this, it won't be necessary a .bmp file for example..
Thanks,
Selles
Seems like you already found the answer, but I figured it wouldn't hurt to have an extra source.
Edit: It's GPL, but you hereby have my "written" permission to use the image code with whatever license you choose, in case someone realizes that I'm actually encouraging you to use GPL code without knowing what license you plan on using. I'm planning on switching to LGPL or BSD anyway. Regardless, you hereby have my permission.
"Here, then, is the problem which we present to you, stark and dreadful and inescapable: Shall we put an end to the human race; or shall mankind renounce war?" -The Russell-Einstein Manifesto, 1955