Skip to content
Snippets Groups Projects
Commit d3a08db6 authored by Almohamed Alsadou Fatima's avatar Almohamed Alsadou Fatima
Browse files

jai oublie de faire un push hier

parent 5e2475cd
Branches
No related tags found
No related merge requests found
File added
class Bloc :
"""
$$$ bloc1=Bloc(1,3,10,(0,0,255))
$$$ bloc1=Bloc((3,1),(10,2),(0,0,255),4)
$$$ bloc1.pxhautgauche
3
(3,1)
$$$ bloc1.pxbasdroite
10
(10,2)
$$$ bloc1.couleur
(0,0,255)
$$$ bloc1.sousblocs
4
"""
def __init__(pxhautgauche:tuple[int,int],pxbasdroite:tuple[int,int],couleur:tuple[int,int,int],sousblocs):
def __init__(pxhautgauche:tuple[int,int],pxbasdroite:tuple[int,int],couleur:tuple[int,int,int],sousblocs:int):
self.pxhautgauche=pxhautgauche
self.pxbasdroite=pxbasdroite
......@@ -28,6 +30,13 @@ class Bloc :
return self.ordre==1
def docoupage_image(xmax:int,ymax:int,fichier:str)->'Bloc':
bloc=''
for (x,y) in (xmax,ymax):
im=Image.open(fichier)
bloc+=im.getpixel(x,y)
return bloc
# def __getitem__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment