Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def glass(extracted_pic, fuzz):
  2. width = extracted_pic.width()
  3. height = extracted_pic.height()
  4. glass_image = Picture(width, height)
  5. if fuzz > 10.0 or fuzz < -10.0:
  6. stdio.write('ERROR: too much fuzz')
  7. quit()
  8. else:
  9. for col in range(width):
  10. for row in range(height):
  11. col_col = (width + col + random.randint(fuzz, 20)) % width
  12. row_row = (height + row + random.randint(fuzz, 20)) % height
  13. asd = extracted_pic.get(col_col, row_row)
  14. glass_image.set(col, row, asd)
  15. return glass_image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement