negative.py 313 B

1234567891011
  1. # Negative
  2. from lazpaint import image, layer, colors, dialog
  3. width, height = image.get_size()
  4. image = layer.get_image(0, 0, width, height)
  5. for y in range(0, height):
  6. scanline = image[y]
  7. for x in range(0, width):
  8. scanline[x] = scanline[x].linear_negative()
  9. layer.put_image(0, 0, image, layer.DM_SET)