Is it possible, using something like lua socket or something like that, to get and use images from the web in a love project?
Thanks!
Images from the Web
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- MicroMacro
- Citizen
- Posts: 92
- Joined: Fri May 30, 2014 2:30 am
- Location: Boston, MA, USA
- Contact:
Images from the Web
https://github.com/ebernerd- where you can find all my work.
Re: Images from the Web
Yes. You can use luasocket's http.request and love.image.newImageData to do so.MicroMacro wrote:Is it possible, using something like lua socket or something like that, to get and use images from the web in a love project?
Thanks!
DRAW DRAW - online painting app CLICK NUMBERS - cool game with numbers THEME LOVEFRAMES - a collection of my themes HOST FOR FREE - free hosting for online LOVE games STALK PEOPLE - a map of LOVE users
- MicroMacro
- Citizen
- Posts: 92
- Joined: Fri May 30, 2014 2:30 am
- Location: Boston, MA, USA
- Contact:
Re: Images from the Web
Could you provide an example?
https://github.com/ebernerd- where you can find all my work.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Images from the Web
Code: Select all
local http = require "socket.http"
local logo
function love.load()
logo = http.request("http://love2d.org/style/logo.png")
logo = love.filesystem.newFileData(logo, "logo.png")
logo = love.graphics.newImage(logo)
end
function love.draw()
love.graphics.draw(logo)
end
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests