I was trying to make a script, when I ran into this issue.
app.image is nil and I don’t know why since I have an image open.
local image = app.image
if image == nil then
return app.alert("NO IMAGE IN APP")
end
for it in image:pixels() do
local pixelValue = it() -- get pixel
it(pixelValue) -- set pixel
print(it.x, it.y) -- get pixel x,y coordinates
end
return app.alert("EXECUTED SUCCESSFULLY YAY!")
This is all the code.