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 


Suggestion?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri May 03, 2013 6:13 pm    Post subject: Suggestion? Reply with quote

Well we can use this command
Code:
image_loadImageFromFile(image, filename)
to load it as an image.
But we should do it this way too
Code:
http = require("socket.http")
a = http.request("http://forum.cheatengine.org/templates/subSilver/images/logo_phpBB.gif")

image_loadImageFromFile(UDF1_CEImage1, a)
--Or new command: image_loadImageFromUrl

Which returns unfortunately
Code:
Error:Unable to open file "GIF89a?"


Hope this can be done
Or I've done it wrong? =P

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Fri May 03, 2013 7:57 pm    Post subject: Reply with quote

You need to save the file to disk then point image_loadImageFromFile to the file path.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri May 03, 2013 8:03 pm    Post subject: Reply with quote

Is it possible to load it directly?
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Fri May 03, 2013 8:10 pm    Post subject: Reply with quote

As far as I know there is no method exposed to directly load the image like that from memory.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Fri May 03, 2013 8:39 pm    Post subject: Reply with quote

Did you try picture_loadFromStream ?

I would have loved to try it before posting, but I couldn't find a luasocket.dll that works with CE after 10mn of various attempts. Where did you find yours? Or did you compile your own?

EDIT: got one.
EDIT2: looks like picture_loadFromStream won't help. At least I didn't find a way to convert the result of an http request to a stream (other that saving to a temporary file and reloading it).
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 All times are GMT - 6 Hours
Page 1 of 1

 
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