Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/python
import Image
#_______________________________________________________load image/create 'canvas'
source = Image.open("test26.jpg")
img = source.load()
print source.format
@vvdr12
vvdr12 / rotation_losses.py
Created September 18, 2013 21:40
Put test.jpg in same folder as script. Written for python 2.x. Written for linux so you may need to remove first line of code. Must have PIL library installed.
#! /usr/bin/python
import Image
#Created by vvdr12
#No rights reserved :)
#Have fun and do what you will with it.
#_______________________________________________________source
source = Image.open("test.jpg")
img = source.load()
@vvdr12
vvdr12 / divisiblesort.py
Created September 13, 2013 07:28
Place divisiblesort.py script in same folder as the picture you want to glitch: 'test.jpg'. Delete first line if you are not using Linux. I like the effect best when using one of the recommended divisible numbers... It'll explain. For cross-hatch pixel sort: Sort once, flip image 90 degrees, sort again.
#! /usr/bin/python
import Image
#_______________________________________________________open
source = Image.open("test.jpg")
img = source.load()
print source.format
print source.size
#! /usr/bin/python
import Image
#Created by vvdr12
#Fully open license. Have fun.
#change threshold value in 'def contrastpoints' for higher/lower line density.
#put a 'test.jpg' file in the same folder as the code.
#_functions______________________________________________