update
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
def average_color(x, y, n, image):
|
||||
def average_color(x, y, w, h, image):
|
||||
r, g, b = 0, 0, 0
|
||||
count = 0
|
||||
for s in range(x, x + n + 1):
|
||||
for t in range(y, y + n + 1):
|
||||
print([x, y, w, h])
|
||||
for s in range(x, x + w + 1):
|
||||
for t in range(y, y + h + 1):
|
||||
pixlr, pixlg, pixlb = image[s, t]
|
||||
r += pixlr
|
||||
g += pixlg
|
||||
|
||||
Reference in New Issue
Block a user