mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-28 08:04:45 +03:00
Merge branch 'master' of https://github.com/nediamond/Pillow
This commit is contained in:
commit
97f652ab2b
|
@ -329,7 +329,7 @@ def floodfill(image, xy, value, border=None, thresh=0):
|
||||||
:param thresh: Optional threshold value which specifies a maximum
|
:param thresh: Optional threshold value which specifies a maximum
|
||||||
tolerable difference of a pixel value from the 'background' in
|
tolerable difference of a pixel value from the 'background' in
|
||||||
order for it to be replaced. Useful for filling regions of non-
|
order for it to be replaced. Useful for filling regions of non-
|
||||||
homogenous, but similar, colors.
|
homogeneous, but similar, colors.
|
||||||
"""
|
"""
|
||||||
# based on an implementation by Eric S. Raymond
|
# based on an implementation by Eric S. Raymond
|
||||||
pixel = image.load()
|
pixel = image.load()
|
||||||
|
|
|
@ -415,7 +415,7 @@ class TestImageDraw(PillowTestCase):
|
||||||
im, centre_point, ImageColor.getrgb("red"),
|
im, centre_point, ImageColor.getrgb("red"),
|
||||||
thresh=30)
|
thresh=30)
|
||||||
del draw
|
del draw
|
||||||
im.save("x.png")
|
|
||||||
# Assert
|
# Assert
|
||||||
self.assert_image_equal(
|
self.assert_image_equal(
|
||||||
im, Image.open("Tests/images/imagedraw_floodfill2.png"))
|
im, Image.open("Tests/images/imagedraw_floodfill2.png"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user