PNG error fixed
[imago.git] / imago.py
index 1cda8ba..ab44f4f 100755 (executable)
--- a/imago.py
+++ b/imago.py
@@ -47,6 +47,9 @@ def main():
     except IOError, msg:
         print >> sys.stderr, msg
         return 1
+    if image.mode == 'P':
+        image = image.convert('RGB')
+    
     if image.size[0] > args.w:
         image = image.resize((args.w, int((float(args.w)/image.size[0]) *
                               image.size[1])), Image.ANTIALIAS)