Loading an Image from a URL

Community Forums/Monkey Talk/Loading an Image from a URL

Leon Drake(Posted 2012) [#1]
seems kind of silly this functionality wasn't built in, with html5 being the initial target for the demo.

i've been trying a few things like loading an image using an XMLHTTPRequest and grab image but its not working. not sure if anyone has made anything that works well but i could really use it in a project i am working on.


AdamRedwoods(Posted 2012) [#2]
http://www.monkeycoder.co.nz/Community/posts.php?topic=137&

but you're right, it should be built in since all targets (maybe not XNA?) support it.


Leon Drake(Posted 2012) [#3]
yea i was trying that one out, i guess i was just having some weird issue where the entire screen goes black if async is off ( and then nothing ever happens) and then when i do get the response i get a blank image even if i write it to draw the image into the canvas. I dunno i guess it will take some more work.

But honestly the methods to do this are kind of wonky. really all i wanted to do was have it display a profile picture in my app from my website users. I was half considering to put the uploaded images into the data folder online but i was concerned that the game would try to download every single picture in the folder which would suck.