Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from PIL import Image
fname = input()
image =
pix = image.load()
npixels = image.size[0]*image.size[1]
ncloud = 0
for x in range(image.size[0]):
for y in range(image.size[1]):
col = pix[x,y]
if col[0] >= 192 and col[1] >= 192 and col[2] >= 192:
ncloud += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.