Skip to content

Instantly share code, notes, and snippets.

@DanBrink91
Created August 24, 2013 21:22
Show Gist options
  • Save DanBrink91/6330487 to your computer and use it in GitHub Desktop.
Save DanBrink91/6330487 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
import Image
source = Image.open("test.jpg")
img = source.load()
width = source.size[0]
height = source.size[1]
for y in xrange(0, height):
for x in xrange(0, width):
img[x, y] = (255 - img[x,y][0], 255 - img[x,y][1], 255 - img[x,y][2],)
source.save("danify.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment