Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def lineCheck(pict,k):
- #@param:
- # pict: picture;
- # k: int;
- width = getWidth(pict)
- height = getHeight(pict)
- a = False
- for y in range(0,height):
- s = 0
- for x in range(0,width):
- pix = getPixel(pict,x,y)
- r = getRed(pix)
- s = s+r
- if s == k:
- a = True
- if a:
- return True
- else:
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement