Kimi生成
from PIL import Image
def generate_icon(source_image_path, output_image_path, size):
with Image.open(source_image_path) as img:
# 转换图片为RGBA模式,确保有透明通道
if img.mode !=
Kimi生成
from PIL import Image
def generate_icon(source_image_path, output_image_path, size):
with Image.open(source_image_path) as img:
# 转换图片为RGBA模式,确保有透明通道
if img.mode !=