X-Git-Url: http://git.tomasm.cz/imago.git/blobdiff_plain/444c17ee7aa867e50bc23066a27b38e28f2152e1..149a52a7ed82d85e78245dfd65e1b25de2c4dc75:/src/manual.py?ds=inline diff --git a/src/manual.py b/src/manual.py index b761f5e..2eb4ac5 100644 --- a/src/manual.py +++ b/src/manual.py @@ -91,7 +91,10 @@ def find_lines(im_orig): if len(corners) == 4: im = im_orig.copy() draw = ImageDraw.Draw(im) - l_vert, l_hor = lines(corners) + try: + l_vert, l_hor = lines(corners) + except Exception: + corners = corners[:-1] for l in l_vert: draw.line(l, fill=color, width=line_width) for l in l_hor: