Skip to content
Snippets Groups Projects
Commit 0aeb5676 authored by Kinadinova Dariya's avatar Kinadinova Dariya
Browse files

Image_Recursive

parent 1dfbcd78
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,11 @@ def Image_Recursive(image: Image, order: int):
if order != 0:
allblocks = b.divide_blocks()
allb = [Image_Recursive(b1.image, order -1) for b1 in allblocks]
if all(b1.is_uniform)
if all(b1.is_uniform() for b1 in allb):
avg_c = average_color([b1.color for b1 in allb])
new_b = Block(Image.new(image.size, avg_c))
return new_b
else: block_im = Image.new(image.size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment