Jump to content

[HELP] Web Images


Imposter

Recommended Posts

fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false) 
  
function myCallback( responseData ) 
   myTexture = dxCreateTexture(responseData ) 
end 
  
  
  
addEventHandler("onClientRender", root, 
    function() 
        if myTexture then 
            local w,h = dxGetMaterialSize( myTexture ) 
            dxDrawImage( 200, 100, w, h, myTexture ) 
        end 
    end 
) 

Link to comment
fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false) 
  
function myCallback( responseData ) 
if fileExists("image.jpg") then 
fileDelete("image.jpg") 
end 
local file = fileCreate("image.jpg") 
fileWrite(file, responseData) 
fileClose(file) 
guiCreateStaticImage(x, y, x, y, "image.jpg", bool) --Provide the XYs 
end 

This works for me

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...