import pillow_avif
from PIL import Image
# pillow-avif-plugin==1.2.2
def convert_avif_to_jpg(input_path, output_path):
with Image.open(input_path) as img:
# 将图像转换为 RGB 模式确保兼容性
img = img.convert('RGB')
img.save(output_path, 'JPEG')
result = convert_avif_to_jpg("ttt.avif", "output.jpg")
avif格式转jpg
最新推荐文章于 2025-07-04 22:04:09 发布