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: 58
Joined: Tue Jan 14, 2014 2:03 am

Grab color/pixel info from an Image?

Post by dizzykiwi3 »

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 »

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: No registered users and 82 guests