diff --git a/.DS_Store b/.DS_Store index a6129eb245f3d17cafa480434911d783df23afcd..013240d825733ae89c123f8a4061e1cadff14adf 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Projet/.DS_Store b/Projet/.DS_Store index 0116c89f37a6e79ad9ddb9eb7a803a279f48370f..906135ea4eaf9269ff662b419f2139306d97e4c5 100644 Binary files a/Projet/.DS_Store and b/Projet/.DS_Store differ diff --git a/Projet/src/.DS_Store b/Projet/src/.DS_Store index 044889880fc94c6fc63cae57f79ab2e0f0af49ae..e68ebb3a7fe22ce3d21badb20a2758a5823aeefe 100644 Binary files a/Projet/src/.DS_Store and b/Projet/src/.DS_Store differ diff --git a/Projet/src/bloc.py b/Projet/src/bloc.py index 9f80b009d632888631d073d9f41640665f6bd825..ef5af53209e7a3ee0d986bc8d818651cb1b3e201 100755 --- a/Projet/src/bloc.py +++ b/Projet/src/bloc.py @@ -11,7 +11,7 @@ """ from PIL import Image, ImageDraw -from fonctions import * +from manip_couleurs import * class Bloc: """Classe d'un bloc d'une image en pixel @@ -29,12 +29,22 @@ class Bloc: def __eq__(self, other): """ Renvoie True si 2 images sont identiques au pixel près - Précondition : + Précondition : aucune Exemple(s) : $$$ """ return self.image == other.image + + def est_bloc_uniforme(self): + """ + Renvoie True si le bloc est un bloc uniforme + Précondition : + Exemple(s) : + $$$ + + """ + return pixel_hl == pixel_lr diff --git a/Projet/src/decoupe_image.py b/Projet/src/decoupe_image.py index 4dd49ad20b7a5790bcf765c6f8e9cfd7d92c3053..6ecb4d4423add43517b3ae8cc71bea94b7cab91f 100755 --- a/Projet/src/decoupe_image.py +++ b/Projet/src/decoupe_image.py @@ -10,6 +10,7 @@ """ from PIL import Image, ImageDraw + def decoupe_image(image: Bloc, ordre: int) -> Bloc: """ Decoupe un bloc en quatre bloc "ordre" fois diff --git a/Projet/src/fonctions.py b/Projet/src/manip_couleurs.py similarity index 100% rename from Projet/src/fonctions.py rename to Projet/src/manip_couleurs.py