From 4136f8ee3c260e28acf13cfb5e1005353363f031 Mon Sep 17 00:00:00 2001 From: Louis Chmielewski <louis.chmielewski@icloud.com> Date: Mon, 18 Mar 2024 18:51:47 +0100 Subject: [PATCH] en_4_blocs class bloc --- .DS_Store | Bin 10244 -> 10244 bytes Projet/.DS_Store | Bin 6148 -> 6148 bytes Projet/src/bloc.py | 18 +++++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 444e653b3ab3039cc2dfa930f534d7ffe9a1d546..d619dc514f7fbaf47beba35e00db39750663a3e3 100644 GIT binary patch delta 148 zcmZn(XbIS$CJ;MgCj$cm3xgg*IzuKyNp8N2OHxjL5(5JR2Ll7c+{i0O9Z}^|;PN(n z6|>Rh3o;CYlk;;67(hUiVRN&9Jfn(L1p@;E8$$p?5ko#h7DFn!H4UASS2iCLv=ajW DoLVG4 delta 148 zcmZn(XbIS$CJ@_tm4ShQg+Y%YogtH<Bsbs1B`GIAiGhKE!%*AhzVel$j;Qh}c;yQ+ z41<&Na|;+iK%-%Evw%FKiupkX1_m~U0EQxle1<HBR8(si7#KFLyS(|Bpq&^12<RoC diff --git a/Projet/.DS_Store b/Projet/.DS_Store index 7c4f7b3300b6f8babdf813216b14652885ea2f8d..273da1de5b714b196a0af5fce08fd4b40994a30c 100644 GIT binary patch delta 23 fcmZoMXffFEj*Ur+b@B%`N#@STE1P-Pe+U2oWi|+B delta 23 fcmZoMXffFEj*Us(Z}JB=N#?|LmpAjU{}2EGY7_|B diff --git a/Projet/src/bloc.py b/Projet/src/bloc.py index 75ffa56..79b1175 100755 --- a/Projet/src/bloc.py +++ b/Projet/src/bloc.py @@ -77,7 +77,23 @@ class Bloc: return res - + def en_4_blocs(bloc:Bloc)->bloc: + """ + Divise un bloc en 4 blocs + Précondition : aucune + Exemple(s) : + $$$ + + """ + return \n + bloc1 = pixel_hl = image.getpixel((0, 0)) and \n + pixel_lr = image.getpixel((largeur/2, hauteur/2)) \n + bloc2 = pixel_hl = image.getpixel((largeur/2, 0)) and \n + pixel_lr = image.getpixel((largeur, hauteur/2)) \n + bloc3 = pixel_hl = image.getpixel((0, hauteur/2)) and \n + pixel_lr = image.getpixel((largeur/2, hauteur)) \n + bloc4 = pixel_hl = image.getpixel((largeur/2, hauteur/2)) and \n + pixel_lr = image.getpixel((largeur, hauteur)) -- GitLab