w, h = img.width, img.height

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

return "all white"