projekty
/
imago.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ebc56e
)
imago.py
author
Tomas Musil
<tomik.musil@gmail.com>
Thu, 5 Apr 2012 17:45:24 +0000
(19:45 +0200)
committer
Tomas Musil
<tomik.musil@gmail.com>
Thu, 5 Apr 2012 18:09:13 +0000
(20:09 +0200)
imago.py
[new file with mode: 0755]
patch
|
blob
diff --git a/imago.py
b/imago.py
new file mode 100755
(executable)
index 0000000..
1d364a5
--- /dev/null
+++ b/
imago.py
@@ -0,0
+1,22
@@
+#!/usr/bin/env python
+"""Usage: imago.py file"""
+
+import Image
+import im_debug
+import sys
+
+def main(argv=None):
+ """Main function of the program."""
+ if argv is None:
+ argv = sys.argv[1]
+
+ #TODO exception on empty argument
+ #TODO exception on file error
+ image = Image.open(argv)
+ im_debug.show(image, "Original image")
+
+ im_l = image.convert('L')
+ im_debug.show(im_l, "ITU-R 601-2 luma transform")
+
+if __name__ == '__main__':
+ main()