debian/spiv.manpages: +spiv.1
[gfxprim/pasky.git] / demos / py_simple / invert.py
blob684facc79746c4da7f893a31aa4509035a90e962
1 #!/usr/bin/env python
2 import sys
4 import gfxprim.core as core
5 import gfxprim.loaders as loaders
6 import gfxprim.filters as filters
8 def main():
9 if len(sys.argv) != 2:
10 print("usage: invert.py image")
11 sys.exit(1)
13 # Load Image
14 img = loaders.Load(sys.argv[1])
15 # Invert image in-place
16 img.filters.Invert(img);
17 # Save result into png
18 img.loaders.SavePNG("out.png")
20 if __name__ == '__main__':
21 main()