w, h = img.width, img.height for y=0, h-1 do for x=0, w-1 do if img.getInt(x, y) ~= 0 then return "not all black" end end end return "all black"