Skip to content
Snippets Groups Projects
Commit 03bcb147 authored by Louis Chmielewski's avatar Louis Chmielewski
Browse files

__init__ class bloc

parent 6747aa5b
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
...@@ -21,6 +21,9 @@ class Bloc: ...@@ -21,6 +21,9 @@ class Bloc:
""" """
Initialise le type bloc à la valeur de l'image 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 self.image = image
def __eq__(self, other): def __eq__(self, other):
......
#!/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
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- 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 :author: Louis Chmielewski
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment