新增256*256 ico图标,用于修复windows下应用图标模糊问题

This commit is contained in:
Tlntin
2022-11-19 18:20:40 +08:00
parent 6014812568
commit b15a258bf2
23 changed files with 4 additions and 0 deletions

View File

@@ -23,11 +23,14 @@ if __name__ == "__main__":
icns_path = os.path.join(icons_dir, file)
image = Image.open(icns_path)
image_512 = image.copy().resize((512, 512))
image_256 = image.copy().resize((256, 256))
image_32 = image.copy().resize((32, 32))
image_name = os.path.splitext(file)[0]
image_512_path = os.path.join(png_dir, image_name + "_512.png")
image_256_path = os.path.join(png_dir, image_name + "_256.ico")
image_32_path = os.path.join(png_dir, image_name + "_32.ico")
image_512.save(image_512_path, "PNG")
image_256.save(image_256_path, "ICO")
image_32.save(image_32_path, "ICO")
print("png file write success.")
print(f"There are {len(os.listdir(png_dir))} png picture in ", png_dir)