WHY? WHY MAKE IT SO MUCH HARDER?Available since LÖVE 0.9.0 and removed in LÖVE 11.0
Create an ImageData from a file, create the Image from that, and keep a reference to the ImageData, instead of using this function.
Right now in my game I NEEDED this function. I was using it to retrieve the ImageData and look for specific pixels in an image so I could know if the player clicked on the sprite itself or on a transparent pixel. The code was something like this:
Code: Select all
r, g, b, a = raw:getPixel(rawx + xx, rawy + yy)
if a > 10 then
return true
else
return false
end