mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 17:33:08 +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:
|
if background == value:
|
||||||
return # seed point already has fill color
|
return # seed point already has fill color
|
||||||
pixel[x, y] = value
|
pixel[x, y] = value
|
||||||
except IndexError:
|
except (ValueError, IndexError):
|
||||||
return # seed point outside image
|
return # seed point outside image
|
||||||
edge = [(x, y)]
|
edge = [(x, y)]
|
||||||
if border is None:
|
if border is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user