What do you consider a blank image. All white, all black or some other color. If you want to check if the image is all the same color, black, white, or what ever, then you would have to check every pixel to be 100% sure. As far as I know, there isn’t a quick way to check for a blank image. What size image are you checking.
@Dwins I don’t know where your images are, but you might be able to do something like this. Put the image names in a table and it will print the image name and if it’s blank or not.
function setup()
tab={"Planet Cute:Character Horn Girl","Planet Cute:Character Pink Girl"}
for z=1,#tab do
print(tab[z])
img=readImage(tab[z])
checkImage()
end
end
function checkImage()
w=img.width
h=img.height
n=0
for x=1,w do
for y=1,h do
r,g,b,a=img:get(x,y)
n=n+a
end
end
if n~=0 then
print("image isn't blank")
else
print("image is blank")
end
end
Thanks @dave1707 that looks pretty close to what I wrote. I guess since there isn’t a great way to optimize it I’ll just put up with waiting a few seconds