From 9df07dcabd90676dce45b25731f410f79153208f Mon Sep 17 00:00:00 2001 From: kirbylife Date: Tue, 4 May 2021 00:51:16 -0500 Subject: [PATCH] remove unnecesary functions --- sailify_webapps.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sailify_webapps.py b/sailify_webapps.py index 0905941..2b00fbb 100644 --- a/sailify_webapps.py +++ b/sailify_webapps.py @@ -16,21 +16,6 @@ def img_to_array(img: Image) -> np.array: img_array = np.array(img) return img_array -def _avg_colors(img: Image) -> tuple: - img_array = img_to_array(img) - avg_colors = np.mean(img_array, axis=tuple(range(img_array.ndim - 1))) - avg_list = list(map(int, avg_colors)) - avg_list[3] = 255 - return tuple(avg_list) - -def __avg_colors(pil_img): - img = pil_img.copy() - img.convert("RGB") - img.resize((1, 2), resample=0) - dominant_color = img.getpixel((0, 0)) - print(img.getpixel((0, 1))) - return dominant_color - def avg_colors(img): img_array = img_to_array(img) colors, count = np.unique(img_array.reshape(-1,img_array.shape[-1]), axis=0, return_counts=True)