Commits

Jakub Wilk committed ceabafc

Use ‘from PIL import Image’ instead of ‘import Image’.
According to <http://mail.python.org/pipermail/image-sig/2011-January/006650.html>; the latter won't be supported in PIL 1.2.

Comments (0)

Files changed (2)

leechy/__init__.py

         except ImportError:
             aalib = None
         try:
-            import Image, ImageChops
+            from PIL import Image, ImageChops
             image = Image.open(image_fp)
             image = self.enhance_captcha(image)
             result = self.solve_captcha(image)

leechy/netload.py

 
     def enhance_captcha(self, image):
         try:
-            import ImageFilter
+            from PIL import ImageFilter
         except ImportError:
             return image
         return image.convert('L').filter(ImageFilter.MedianFilter(size=3))