Advertisement
valerio_mazza

Funzione invertRedBlue

Nov 6th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def invertRedBlue(pict, k):
  2. # @param pict: Picture
  3. # @param k: Int. Tutti i pixel che hanno coordinata x<k avranno le componenti Red e Blue invertite
  4.   for px in getPixels(pict):
  5.     x = getX(px)
  6.     if x < k:
  7.       red = getRed(px)
  8.       blue = getBlue(px)
  9.       setRed(px, blue)
  10.       setBlue(px, red)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement