Skip to content
Snippets Groups Projects
Commit c9751539 authored by Kinadinova Dariya's avatar Kinadinova Dariya
Browse files

class block

parent 6e29373d
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
""" """
from PIL import Image, ImageDraw from PIL import Image, ImageDraw
from color.py import * from color import *
class Block: class Block:
def __init__(self, image): def __init__(self, image):
...@@ -30,7 +30,6 @@ class Block: ...@@ -30,7 +30,6 @@ class Block:
colors = liste_col(self.image, (0, 0), (self.width-1, self.height-1)) colors = liste_col(self.image, (0, 0), (self.width-1, self.height-1))
return avg_col(colors) return avg_col(colors)
def is_uniform(self, coordinates: tuple()): def is_uniform(self, coordinates: tuple()):
"""à_remplacer_par_ce_que_fait_la_fonction """à_remplacer_par_ce_que_fait_la_fonction
......
from PIL import Image, ImageDraw from PIL import Image, ImageDraw
def decouper(file: str) -> list[Image]: def decouper(im: Image) -> list[Image]:
"""splits image into four blocks """splits image into four blocks
Précondition : Précondition :
...@@ -9,7 +9,6 @@ def decouper(file: str) -> list[Image]: ...@@ -9,7 +9,6 @@ def decouper(file: str) -> list[Image]:
$$$ $$$
""" """
im = Image.open(file)
im_rgb = im.convert('RGB') im_rgb = im.convert('RGB')
size = im_rgb.size size = im_rgb.size
w = size[0] w = size[0]
......
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment