From 1dfbcd78a87b707924686d1da9aa2fda7b6c4a24 Mon Sep 17 00:00:00 2001
From: Kinadinova Dariya <dariya.kinadinova.etu@115p4.fil.univ-lille.fr>
Date: Wed, 27 Mar 2024 14:09:26 +0100
Subject: [PATCH] Image_Recursive

---
 projet/ReadMe.md                    |   3 +++
 projet/codes/Block.py               |   3 ++-
 projet/codes/{color.py => Color.py} |   7 +++--
 projet/codes/Decouper_Image.py      |   6 +++++
 projet/codes/Image_Recursive.py     |  38 ++++++++++++++++++++++++++++
 projet/{ => codes}/calbuth.png      | Bin
 6 files changed, 54 insertions(+), 3 deletions(-)
 rename projet/codes/{color.py => Color.py} (96%)
 create mode 100644 projet/codes/Image_Recursive.py
 rename projet/{ => codes}/calbuth.png (100%)

diff --git a/projet/ReadMe.md b/projet/ReadMe.md
index b1c9bc2..8a7ffd5 100644
--- a/projet/ReadMe.md
+++ b/projet/ReadMe.md
@@ -10,3 +10,6 @@
 
 #### **20/03/24 :**
 - 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.
diff --git a/projet/codes/Block.py b/projet/codes/Block.py
index 35e9dc1..71ce257 100644
--- a/projet/codes/Block.py
+++ b/projet/codes/Block.py
@@ -5,7 +5,8 @@
 """
 
 from PIL import Image, ImageDraw
-from color import *
+from Color import *
+from Decouper_Image import *
 
 class Block:
     def __init__(self, image):
diff --git a/projet/codes/color.py b/projet/codes/Color.py
similarity index 96%
rename from projet/codes/color.py
rename to projet/codes/Color.py
index 7856c9c..ea1d5cc 100644
--- a/projet/codes/color.py
+++ b/projet/codes/Color.py
@@ -1,5 +1,8 @@
-# KINADINOVA Dariya
-# Images récursives
+"""
+:author: dariya kinadinova
+:date: 03/2024
+
+"""
 
 from PIL import Image, ImageDraw
 
diff --git a/projet/codes/Decouper_Image.py b/projet/codes/Decouper_Image.py
index d2b834b..ed35a02 100644
--- a/projet/codes/Decouper_Image.py
+++ b/projet/codes/Decouper_Image.py
@@ -1,3 +1,9 @@
+"""
+:author: dariya kinadinova
+:date: 03/2024
+
+"""
+
 from PIL import Image, ImageDraw
 
 
diff --git a/projet/codes/Image_Recursive.py b/projet/codes/Image_Recursive.py
new file mode 100644
index 0000000..bf5db57
--- /dev/null
+++ b/projet/codes/Image_Recursive.py
@@ -0,0 +1,38 @@
+"""
+:author: dariya kinadinova
+:date: 03/2024
+
+"""
+import sys
+from PIL import Image, ImageDraw
+from Color import *
+from Decouper_Image import *
+from Block import *
+
+def Image_Recursive(image: Image, order: int):
+    """à_remplacer_par_ce_que_fait_la_fonction
+
+    Précondition : 
+    Exemple(s) :
+    $$$ 
+
+    """
+    im = image.convert('RGB')
+    b = Block(im)
+    if order != 0:
+        allblocks = b.divide_blocks()
+        allb = [Image_Recursive(b1.image, order -1) for b1 in allblocks]
+        if all(b1.is_uniform)
+        
+
+
+def main():
+    """à_remplacer_par_ce_que_fait_la_fonction
+
+    Précondition : 
+    Exemple(s) :
+    $$$ 
+
+    """
+    
+    
\ No newline at end of file
diff --git a/projet/calbuth.png b/projet/codes/calbuth.png
similarity index 100%
rename from projet/calbuth.png
rename to projet/codes/calbuth.png
-- 
GitLab