Page 1 of 1
Puting text into imageData
Posted: Sat Apr 20, 2013 5:24 am
by columna1
I was working on a picture maker and i want text support but i have only found out how to save with the imageData:encode function and i dont know how to put text into an image data object can someone help me on this one?
Re: Puting text into imageData
Posted: Sat Apr 20, 2013 10:55 am
by T-Bone
First of all, I'd say that you may have chosen the wrong tools for making your "picture maker", maybe something other than Löve would suit your needs better. That said, I'd say draw it to a Canvas instead, which allows you to use all of the graphics commands. Then try to save it somehow.
Re: Puting text into imageData
Posted: Sat Apr 20, 2013 10:58 am
by slime
T-Bone wrote:Then try to save it somehow.
Code: Select all
Canvas:getImageData():encode("filename.png", "png")
Re: Puting text into imageData
Posted: Sun Apr 21, 2013 1:41 am
by columna1
Yes... Right after posting this I realized that this was a stupid question, also I just switched over to lua for windows