Jump to content
Sign in to follow this  
dar100111

Compile Image into exe

Recommended Posts

dar100111

Hey Everyone!
 
Is it possible to compile a JPEG picture that I'm using into the exe so the file doesn't have to be installed on the users computer to show up?

Thanks!
 

$Form1 = GUICreate("Ft. Worth Cats Database", 442, 360, 279, 238)
$Pic1 = GUICtrlCreatePic("cats_logo.jpg", 100, 0, 255, 198)

Share this post


Link to post
Share on other sites
UEZ

Yes, it is possible. There are two ways, 1st is to use resources and the 2nd way is to convert the image into a binary string and use it directly from memory.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
UEZ

Well, your answer is not the solution to your question how to use an image whereas "the file doesn't have to be installed on the users computer".

Have a look to >Resources UDF or to >File to Base64 String Code Generator.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
dar100111

Ah I see what you mean by resources now UEZ.  I didn't realize it was another set of UDF's I had to install.  I will check that out.  I didn't realize how easy it was to do the solution above and that it could just re-create the directory above, even if it wasn't on the users computer, or was deleted.  I didn't realize that would keep the picture in the compiled version so I just used that instead.  Seems like the binary solution might be the most effective, I just need to play around with it.

Thanks for the links to the UDF!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.