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

change of name

parent 6f9862a5
Branches
No related tags found
No related merge requests found
......@@ -46,17 +46,17 @@ def avg_col(l:list) -> tuple():
(236, 210, 111)
"""
c1 = 0
c2 = 0
c3 = 0
r = 0
g = 0
b = 0
for col in l:
c1 += col[0]
c2 += col[1]
c3 += col[2]
avg1 = c1 // len(l)
avg2 = c2 // len(l)
avg3 = c3 // len(l)
return (avg1, avg2, avg3)
r += col[0]
g += col[1]
b += col[2]
avg_r = r // len(l)
avg_g = g // len(l)
avg_b = b // len(l)
return (avg_r, avg_g, avg_b)
def list_col(im: Image, left_top: tuple(), right_bottom: tuple()) -> list[int]:
"""Renvoie une liste de tuples de couleurs pour chaque pixel de la région spécifiée de l'image.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment