Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def modQuadrata(pict,x):
- #@param pict: Picture; immagine nxn
- #@param x: int
- w = getWidth(pict)
- if x<0 or x>=w:
- return
- else:
- for j in range:
- pxR = getPixel(pict,j,x) #pixel riga
- pxC = getPixel(pict,x,j) #pixel colonna
- cColor = getColor(pxC) #colore del pixel della colonna
- setColor(pxC,getColor(pxR))
- setColor(pxR,cColor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement