rebuild for 10.11+

This commit is contained in:
j 2019-01-10 14:33:55 +05:30
commit 901b731582
234 changed files with 1522 additions and 927 deletions

View file

@ -391,8 +391,8 @@ def floodfill(image, xy, value, border=None, thresh=0):
pixel.
:param thresh: Optional threshold value which specifies a maximum
tolerable difference of a pixel value from the 'background' in
order for it to be replaced. Useful for filling regions of non-
homogeneous, but similar, colors.
order for it to be replaced. Useful for filling regions of
non-homogeneous, but similar, colors.
"""
# based on an implementation by Eric S. Raymond
# amended by yo1995 @20180806
@ -406,7 +406,9 @@ def floodfill(image, xy, value, border=None, thresh=0):
except (ValueError, IndexError):
return # seed point outside image
edge = {(x, y)}
full_edge = set() # use a set to keep record of current and previous edge pixels to reduce memory consumption
# use a set to keep record of current and previous edge pixels
# to reduce memory consumption
full_edge = set()
while edge:
new_edge = set()
for (x, y) in edge: # 4 adjacent method