fix imports to work with pillow
authorTomas Musil <tomik.musil@gmail.com>
Sun, 20 Jul 2014 14:57:45 +0000 (16:57 +0200)
committerTomas Musil <tomik.musil@gmail.com>
Sun, 20 Jul 2014 14:57:45 +0000 (16:57 +0200)
src/gridf3.py
src/intrsc.py
src/manual.py

index 16d9d7b..ca8decb 100644 (file)
@@ -206,7 +206,7 @@ def find(lines, size, l1, l2, bounds, hough, show_all, do_something, logger):
 
         if show_all:
             import matplotlib.pyplot as pyplot
-            import Image
+            from PIL import Image
 
             def plot_line_g((a, b, c), max_x):
                 find_y = lambda x: - (c + a * x) / b
index b0e798c..91801fe 100644 (file)
@@ -4,7 +4,7 @@ from math import cos, tan, pi
 from operator import itemgetter
 import colorsys
 
-import ImageDraw
+from PIL import ImageDraw
 
 import filters
 import k_means
@@ -68,7 +68,7 @@ def board(image, intersections, show_all, do_something, logger):
 
     if show_all:
         import matplotlib.pyplot as pyplot
-        import Image
+        from PIL import Image
         fig = pyplot.figure(figsize=(8, 6))
         luma = [s[0] for s in board_raw]
         saturation = [s[1] for s in board_raw]
index 5a18fde..fb7f832 100644 (file)
@@ -1,6 +1,6 @@
 """Manual grid selection module"""
 
-import ImageDraw
+from PIL import ImageDraw
 from math import sqrt, acos, copysign
 
 from geometry import l2ad, line, intersection