is it possible to create a png?
-
- Prole
- Posts: 3
- Joined: Wed Nov 30, 2022 5:20 pm
is it possible to create a png?
Is it possible to create a png file by love2d and store this file in some folder?
Re: is it possible to create a png?
welcome
yes, see https://love2d.org/wiki/ImageData:encode and the example "Draw a circle to a canvas and save it to a file"
yes, see https://love2d.org/wiki/ImageData:encode and the example "Draw a circle to a canvas and save it to a file"
-
- Prole
- Posts: 3
- Joined: Wed Nov 30, 2022 5:20 pm
Re: is it possible to create a png?
thank you so much
-
- Prole
- Posts: 3
- Joined: Wed Nov 30, 2022 5:20 pm
Re: is it possible to create a png?
but I have another question, how can I get this file and put it in a directory?knorke wrote: ↑Wed Nov 30, 2022 9:35 pm welcome
yes, see https://love2d.org/wiki/ImageData:encode and the example "Draw a circle to a canvas and save it to a file"
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: is it possible to create a png?
If you give the encode function a filename to use (the second parameter if you check the wiki), it will save the resulting image file in your save folder. The save folder location will depend on system, whether your project is running in fused mode or not, and what your project's app identity is set to.
Who is online
Users browsing this forum: No registered users and 3 guests