Saving Images

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
skyHights
Citizen
Posts: 78
Joined: Mon Aug 25, 2014 12:14 pm

Saving Images

Post by skyHights »

How would one go about saving images (love.graphics.newImage) and/or canvases from a running love file to the computer?
Learning to Löve.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Saving Images

Post by vrld »

image:[wiki=(Image):getData]getData[/wiki]():[wiki=ImageData:encode]encode[/wiki]("png", "image.png")

Or: [wiki]Canvas:newImageData[/wiki]():encode("png", "canvas.png")
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests