debian: Add graphviz dependency
[gfxprim/pasky.git] / demos / py_simple / blur.py
blob70e9da5af4ff2c2ed31abbcb58879678202dbceb
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) != 3:
10 print("usage: blur blur-radii image")
11 sys.exit(1)
13 radii = float(sys.argv[1])
15 # Load Image
16 img = loaders.Load(sys.argv[2])
17 # Do in-place gaussian blur
18 filters.GaussianBlur(img, img, radii, radii)
19 # Save result
20 img.loaders.SaveJPG("out.jpg")
22 if __name__ == '__main__':
23 main()