From f9ae686b678b0c9514ff15bd2d8f488bcb4f8630 Mon Sep 17 00:00:00 2001 From: Kinadinova Dariya <dariya.kinadinova.etu@115p4.fil.univ-lille.fr> Date: Wed, 27 Mar 2024 14:23:26 +0100 Subject: [PATCH] Image_Recursive --- projet/ReadMe.md | 2 +- projet/codes/Color.py | 2 +- projet/codes/Image_Recursive.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/projet/ReadMe.md b/projet/ReadMe.md index 8a7ffd5..f1e4fc1 100644 --- a/projet/ReadMe.md +++ b/projet/ReadMe.md @@ -12,4 +12,4 @@ - Work on Block.py and Decouper_Image.py #### **27/03/24 :** -- I remade functions decouper, added functions list_col and is_col_close. Made functions average_color, divide_blocks to class Block using the functions previously made. +- I remade functions decouper, added functions list_col and is_col_close. Made functions average_color, divide_blocks to class Block using the functions previously made. Work on Image_Recursive. diff --git a/projet/codes/Color.py b/projet/codes/Color.py index ea1d5cc..59edf89 100644 --- a/projet/codes/Color.py +++ b/projet/codes/Color.py @@ -29,7 +29,7 @@ def avg_col(l:list) -> tuple(): return (avg1, avg2, avg3) def list_col(im: Image, left_top: tuple(), right_bottom: tuple()) -> list[int]: - """à_remplacer_par_ce_que_fait_la_fonction + """return a list of colors of each pixels in the given space Précondition : Exemple(s) : diff --git a/projet/codes/Image_Recursive.py b/projet/codes/Image_Recursive.py index ffa978e..a64489e 100644 --- a/projet/codes/Image_Recursive.py +++ b/projet/codes/Image_Recursive.py @@ -26,7 +26,10 @@ def Image_Recursive(image: Image, order: int): 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) + else: + # create a block with index or a loop + block_im = Image.new(image.size) + pass -- GitLab