新增256*256 ico图标,用于修复windows下应用图标模糊问题
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user