get canvas pixel ? store canvas on imageData ?

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
splasher
Prole
Posts: 21
Joined: Mon Nov 19, 2012 3:10 pm

get canvas pixel ? store canvas on imageData ?

Post by splasher »

final target is to write a text on an image.

someone know if it is possible to store an area of canvas into an image?

thanks

arturo
Zamp
Prole
Posts: 14
Joined: Sun Oct 07, 2012 1:30 pm

Re: get canvas pixel ? store canvas on imageData ?

Post by Zamp »

A simple way

Code: Select all

canvas = love.graphics.newCanvas(width,height)
--do your stuff here
imgdata = canvas:getImageData()
imgdata:encode("render.png")
I don't know if that answers your question :ultraglee:
splasher
Prole
Posts: 21
Joined: Mon Nov 19, 2012 3:10 pm

Re: get canvas pixel ? store canvas on imageData ?

Post by splasher »

thank you.
it's what i need.
arturo
Post Reply

Who is online

Users browsing this forum: Yolwoocle and 22 guests