mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Corrected ImageDraw floodfill exception type
This commit is contained in:
parent
5ce44d07ed
commit
d92b1678fe
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user