imago.py
[imago.git] / imago.py
1 #!/usr/bin/env python
2 """Usage: imago.py file"""
3
4 import Image
5 import im_debug
6 import sys
7
8 def main(argv=None):
9     """Main function of the program."""
10     if argv is None:
11         argv = sys.argv[1]
12
13     #TODO exception on empty argument
14     #TODO exception on file error
15     image = Image.open(argv)
16     im_debug.show(image, "Original image")
17
18     im_l = image.convert('L')
19     im_debug.show(im_l, "ITU-R 601-2 luma transform")
20
21 if __name__ == '__main__':
22     main()