From 5f201f99a1feae1e9d9483a89be86662c6436ba0 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 9 Aug 2021 08:46:08 -0700 Subject: [PATCH] Use imagetools.pad_to_square. --- icoconvert.py | 1 + 1 file changed, 1 insertion(+) diff --git a/icoconvert.py b/icoconvert.py index 70b63f1..ee51c21 100644 --- a/icoconvert.py +++ b/icoconvert.py @@ -127,6 +127,7 @@ def load_image(filename): (new_w, new_h) = imagetools.fit_into_bounds(w, h, 256, 256, only_shrink=True) image = image.resize((new_w, new_h), resample=PIL.Image.ANTIALIAS) image = image.convert('RGBA') + image = imagetools.pad_to_square(image) return image def build_ico_header_blob(image_count):