Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- pygame.init()
- surf = pygame.image.load("Orion-Taurus.jpg")
- w, h = surf.get_size()
- for x in range(w):
- for y in range(h):
- r, g, b, *_ = surf.get_at((x, y))
- r*=10
- if r>255: r=255
- g*=10
- if g>255: g=255
- b*=10
- if b>255: b=255
- surf.set_at((x, y), (r, g, b))
- pygame.image.save(surf, "saida.png")
- pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment