Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is it possible to store an image in a variable?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Dec 20, 2016 5:48 pm    Post subject: Reply with quote

So... we're done? I provided fully working code. Paste it and hit execute.
What are you trying to do differently and having trouble with?
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1675

PostPosted: Tue Dec 20, 2016 7:47 pm    Post subject: Reply with quote

Zanzer, Yup, we've done. Thanks for hint, script and support.
I guess my problem is put the correct url address when use getInternet(url) and load file which got form url.

eq.
a file store at pastebin with url : http://pastebin.com/sT9AAKm4

Then i made like this and work

Code:
local int=getInternet()
local logostr=int.getURL("http://pastebin.com/raw/sT9AAKm4")
int.destroy()
img = tostring(logostr)
..
..
// and then use your script function picture = createPictureFromBase64(img) to show pciture.



Everything work fine and thank again

Regards
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Dec 20, 2016 8:05 pm    Post subject: Reply with quote

Still need to point out, since you're downloading it from the internet anyway, you didn't need to encode it in base64.
Using my previous function:
Code:
picture = createPictureFromURL("http://cheatengine.org/celogo.png")
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1675

PostPosted: Tue Dec 20, 2016 8:31 pm    Post subject: Reply with quote

Yes, you are right. I am not have problem while using

Code:
picture = createPictureFromURL("http://cheatengine.org/celogo.png")
// or other other image file with not encoded base64



By using your previous function and get not encoded base64 image file, it work properly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites