Use imagetools.pad_to_square.
This commit is contained in:
parent
4b2209d7ef
commit
5f201f99a1
1 changed files with 1 additions and 0 deletions
|
@ -127,6 +127,7 @@ def load_image(filename):
|
||||||
(new_w, new_h) = imagetools.fit_into_bounds(w, h, 256, 256, only_shrink=True)
|
(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.resize((new_w, new_h), resample=PIL.Image.ANTIALIAS)
|
||||||
image = image.convert('RGBA')
|
image = image.convert('RGBA')
|
||||||
|
image = imagetools.pad_to_square(image)
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def build_ico_header_blob(image_count):
|
def build_ico_header_blob(image_count):
|
||||||
|
|
Loading…
Reference in a new issue