Hello, i was wondering if there is a way to save images via love.image or love.filesystem?
Ive attempted it but haven't found a successful way.
Is there a way in 0.6.2? if not could there be in one of the next updates(like love.image.save(image/imagedata))?
Saving Images?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zipperipper
- Prole
- Posts: 45
- Joined: Thu Jan 14, 2010 7:59 pm
- Location: UK
Saving Images?
Error 404, consciousness not found.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Saving Images?
If you have image data you can encode it using love.image.newEncodedImageData, which you can then use to write to a file.
- zipperipper
- Prole
- Posts: 45
- Joined: Thu Jan 14, 2010 7:59 pm
- Location: UK
Re: Saving Images?
right, and how do i get the string to write to the file?bartbes wrote:If you have image data you can encode it using love.image.newEncodedImageData, which you can then use to write to a file.
Error 404, consciousness not found.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Saving Images?
Using the love.filesystem functions.
Re: Saving Images?
or this:
Code: Select all
pixels = ImageData:getString( )
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Saving Images?
That would be raw.. don't think you want that.
- zipperipper
- Prole
- Posts: 45
- Joined: Thu Jan 14, 2010 7:59 pm
- Location: UK
Re: Saving Images?
Code: Select all
hi = love.image.newImageData("hi.png")
hello = love.image.newEncodedImageData(hi, "tga")
love.filesystem.write("hello.tga", hello)
Who is online
Users browsing this forum: Bing [Bot] and 148 guests