Source

hakanardo / video / negative.py

Full commit
1
2
3
4
5
6
7
8
9
import sys
from video import Image, view, mplayer

fn = sys.argv[1] if len(sys.argv)>1 else 'tv://'

for img in mplayer(fn):
    for p in img.pixels(border=50):
        img[p] = 255 - img[p]
    view(img)