Search found 2 matches

by Notnat Tlikehis
Tue Jul 23, 2019 7:23 pm
Forum: Support and Development
Topic: ImageData:getPixel(1, 1) - argument #2 is not a number
Replies: 3
Views: 3171

Re: ImageData:getPixel(1, 1) - argument #2 is not a number

Ah, ok, that makes sense. Thanks! That would also explain the discrepancy in arguments between what newImageData actually wants and what the wiki says.

Also I just realized I had this page open with a response typed for several days and never hit submit. Whoops.
by Notnat Tlikehis
Fri Jul 19, 2019 6:47 pm
Forum: Support and Development
Topic: ImageData:getPixel(1, 1) - argument #2 is not a number
Replies: 3
Views: 3171

ImageData:getPixel(1, 1) - argument #2 is not a number

I have a canvas (black and white) that represents the lighting in my map. I want to be able to tell when something is in the light or not, so I thought to take the pixel data from the canvas in the middle of the unit. The code I'm using for that is: local pixelData = lightcanvas.newImageData(lightca...