Grab color/pixel info from an Image?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
dizzykiwi3
Citizen
Posts: 56
Joined: Tue Jan 14, 2014 2:03 am

Grab color/pixel info from an Image?

Post by dizzykiwi3 » Tue Feb 23, 2016 9:14 pm

I was wondering if it was possible to grab color/pixel information from an image and use that data. More specifically I was hoping I could automate platform creation by marking an image with certain colors (say, red for platform edges), analyzing the image through some love/shader feature or some utility that could convert it to xml, and then converting that data into usable table information for platform detection.

Many thanks!


User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Grab color/pixel info from an Image?

Post by T-Bone » Fri Feb 26, 2016 3:00 pm

And an ImageData object can be obtained from an Image via https://love2d.org/wiki/%28Image%29:getData, if you already have an Image object.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], filimodadhak, Google [Bot] and 19 guests