diff --git a/.DS_Store b/.DS_Store index 003afd4f6d0267c410233112bbb4c720804e7e90..7db3cfc7620c61be9d8fde923d585642becfa3b5 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Projet/.DS_Store b/Projet/.DS_Store index e740dabcb827ecdfd5d0f3f0a0108543136de213..467feec1eb1da20798a49ef91e27c4c67f24c65d 100644 Binary files a/Projet/.DS_Store and b/Projet/.DS_Store differ diff --git a/Projet/src/bloc.py b/Projet/src/bloc.py index f6656c07b62357eafb0b71c34d1f23a177dd4af7..f7f02fea8f6af0ebc91ba2dce97ce593c1e694a7 100755 --- a/Projet/src/bloc.py +++ b/Projet/src/bloc.py @@ -21,6 +21,9 @@ class Bloc: """ Initialise le type bloc à la valeur de l'image """ + largeur, hauteur = image.size + pixel_hl = image.getpixel((0, 0)) + pixel_lr = image.getpixel((largeur, hauteur)) self.image = image def __eq__(self, other): diff --git a/Projet/src/decoupe_image.py b/Projet/src/decoupe_image.py new file mode 100755 index 0000000000000000000000000000000000000000..4dd49ad20b7a5790bcf765c6f8e9cfd7d92c3053 --- /dev/null +++ b/Projet/src/decoupe_image.py @@ -0,0 +1,29 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +""" +:mod:`fonctions` module : fonctions principal + +:author: Louis Chmielewski + +:date: 2024 mars + +""" +from PIL import Image, ImageDraw +def decoupe_image(image: Bloc, ordre: int) -> Bloc: + """ + Decoupe un bloc en quatre bloc "ordre" fois + Précondition : + Exemple(s) : + $$$ + + """ + image = Image.open(image) + x = ? + y = ? + if 0 <= x < largeur and 0 <= y < hauteur: + pixel = image.getpixel((x, y)) + + if ordre != 0: + + \ No newline at end of file diff --git a/Projet/src/fonctions.py b/Projet/src/fonctions.py index 57a6b59aa2674ce516fd9f191932a6dea33273fe..cb4dc7a6e0b63e86c1d489f6f3fbfc4700281942 100755 --- a/Projet/src/fonctions.py +++ b/Projet/src/fonctions.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -:mod:`association` module : un module pour la modélisation des blocs +:mod:`fonctions` module : fonctions pour la résolution du projet :author: Louis Chmielewski