Corrected ImageDraw floodfill exception type

This commit is contained in:
Andrew Murray 2017-02-25 19:35:29 +11:00
parent 5ce44d07ed
commit d92b1678fe

View File

@ -334,7 +334,7 @@ def floodfill(image, xy, value, border=None):
if background == value:
return # seed point already has fill color
pixel[x, y] = value
except IndexError:
except (ValueError, IndexError):
return # seed point outside image
edge = [(x, y)]
if border is None: