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