From 9e65c8f01fda8f2ad1895c39b80dd081bd87a1b5 Mon Sep 17 00:00:00 2001 From: Tomas Musil Date: Sun, 20 Jul 2014 16:57:45 +0200 Subject: [PATCH] fix imports to work with pillow --- src/gridf3.py | 2 +- src/intrsc.py | 4 ++-- src/manual.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gridf3.py b/src/gridf3.py index 16d9d7b..ca8decb 100644 --- a/src/gridf3.py +++ b/src/gridf3.py @@ -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 diff --git a/src/intrsc.py b/src/intrsc.py index b0e798c..91801fe 100644 --- a/src/intrsc.py +++ b/src/intrsc.py @@ -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] diff --git a/src/manual.py b/src/manual.py index 5a18fde..fb7f832 100644 --- a/src/manual.py +++ b/src/manual.py @@ -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 -- 2.4.2