Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def glass(extracted_pic, fuzz):
- width = extracted_pic.width()
- height = extracted_pic.height()
- glass_image = Picture(width, height)
- if fuzz > 10.0 or fuzz < -10.0:
- stdio.write('ERROR: too much fuzz')
- quit()
- else:
- for col in range(width):
- for row in range(height):
- col_col = (width + col + random.randint(fuzz, 20)) % width
- row_row = (height + row + random.randint(fuzz, 20)) % height
- asd = extracted_pic.get(col_col, row_row)
- glass_image.set(col, row, asd)
- return glass_image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement