SFML community forums

Bindings - other languages => C => Topic started by: mimipim on January 30, 2011, 12:47:46 pm

Title: Images In Executable
Post by: mimipim on January 30, 2011, 12:47:46 pm
Hi guys.

I'm developing a 2D game. That I need is to load images from exe(wheres the game start) or from any filetypes which can't be edited.

How can I do this?
Title: Images In Executable
Post by: Groogy on January 30, 2011, 12:52:46 pm
You can have GIMP compile an image into a header file.. Though they tend to get pretty big.

That should work on any OS that SFML supports.
Title: Images In Executable
Post by: mimipim on January 30, 2011, 01:38:34 pm
Thanks for your reply.

If anyone has another suggestion, let's share it. I want to know all the possibilities.

PS.: Game will be only for windows.
Title: Images In Executable
Post by: JAssange on January 30, 2011, 06:02:02 pm
People can extract and edit your resources no matter what you do. Resource hacker makes it easy to get bitmaps embedded as resources. You're better off leaving PNG files in a content folder in your exe directory and not worrying about it.
Title: Images In Executable
Post by: mimipim on January 30, 2011, 09:22:25 pm
Okay but can I use some other formats, to put all images on one or something like this. Because I don't wanna to be visible so easy the images.
Title: Images In Executable
Post by: Grimshaw on January 30, 2011, 10:12:16 pm
My engine uses a package system, a file that contains other files, you could do something like that, just copy all the files into one in brute, and add a header so you know what is what ;D
Title: Images In Executable
Post by: JAssange on January 30, 2011, 10:20:01 pm
If people want your resources they will take them no matter what you do. If you really don't want them messed with then embed them at the end of your exe, encrypted, in a complex custom package format.
Title: Images In Executable
Post by: on September 29, 2011, 01:04:17 pm
An executable image is a file that acts like a "virtual disk"; when you open the file, it acts as though it is a disk drive.

It's a variation on file compression, such as ZIP or RAR files. Executable images are very common in the Linux / Macintosh world -- most programs installers are contained in executable images, for example -- but less common in the Windows world.


Cegonsoft (http://www.i3itpeople.com/)
_________________________
Cegonsoft foundation (http://www.i3itpeople.com/)