1.0.2 更新 4.9.7 + 图片刷新
BIN
logo/.DS_Store
vendored
Normal file
BIN
logo/1.gif
|
Before Width: | Height: | Size: 964 KiB After Width: | Height: | Size: 452 KiB |
BIN
logo/10.gif
|
Before Width: | Height: | Size: 839 KiB After Width: | Height: | Size: 908 KiB |
BIN
logo/11.gif
|
Before Width: | Height: | Size: 866 KiB After Width: | Height: | Size: 561 KiB |
BIN
logo/2.gif
|
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 526 KiB |
BIN
logo/3.gif
|
Before Width: | Height: | Size: 4.2 MiB After Width: | Height: | Size: 174 KiB |
BIN
logo/4.gif
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 466 KiB |
BIN
logo/5.gif
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 26 KiB |
BIN
logo/6.gif
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 460 KiB |
BIN
logo/7.gif
|
Before Width: | Height: | Size: 796 KiB After Width: | Height: | Size: 566 KiB |
BIN
logo/8.gif
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 72 KiB |
BIN
logo/9.gif
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 270 KiB |
BIN
logo/yuantu/.DS_Store
vendored
Normal file
BIN
logo/yuantu/1.gif
Normal file
|
After Width: | Height: | Size: 964 KiB |
BIN
logo/yuantu/10.gif
Normal file
|
After Width: | Height: | Size: 839 KiB |
BIN
logo/yuantu/11.gif
Normal file
|
After Width: | Height: | Size: 866 KiB |
BIN
logo/yuantu/1111.gif
Normal file
|
After Width: | Height: | Size: 2.7 MiB |
BIN
logo/yuantu/2.gif
Normal file
|
After Width: | Height: | Size: 4.8 MiB |
BIN
logo/yuantu/3.gif
Normal file
|
After Width: | Height: | Size: 4.2 MiB |
BIN
logo/yuantu/4.gif
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
logo/yuantu/5.gif
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
logo/yuantu/6.gif
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
logo/yuantu/7.gif
Normal file
|
After Width: | Height: | Size: 796 KiB |
BIN
logo/yuantu/8.gif
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
logo/yuantu/9.gif
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
34
logo/yuantu/gif_zip.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
from PIL import Image, ImageSequence
|
||||
#pip install pillow
|
||||
def resize_gif(input_path, output_path, width, height):
|
||||
"""按指定宽高重生成 GIF(保持多帧)"""
|
||||
img = Image.open(input_path)
|
||||
|
||||
frames = []
|
||||
for frame in ImageSequence.Iterator(img):
|
||||
frame = frame.convert("RGBA")
|
||||
frame = frame.resize((width, height), Image.Resampling.LANCZOS)
|
||||
frames.append(frame)
|
||||
|
||||
# 保存为 GIF
|
||||
frames[0].save(
|
||||
output_path,
|
||||
save_all=True,
|
||||
append_images=frames[1:],
|
||||
duration=img.info.get("duration", 100),
|
||||
loop=img.info.get("loop", 0),
|
||||
disposal=2,
|
||||
transparency=img.info.get("transparency")
|
||||
)
|
||||
print(f"生成成功: {output_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
width = 100 # 你想要的宽
|
||||
height = 100 # 你想要的高
|
||||
|
||||
for file_name in os.listdir("."):
|
||||
if file_name.lower().endswith(".gif"):
|
||||
output_name = f"new/{file_name}"
|
||||
resize_gif(file_name, output_name, width, height)
|
||||