Skip to content

Instantly share code, notes, and snippets.

@hui-shao
Created September 17, 2023 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hui-shao/f1866aa26303122e64680fdc3a365a75 to your computer and use it in GitHub Desktop.
Save hui-shao/f1866aa26303122e64680fdc3a365a75 to your computer and use it in GitHub Desktop.
基于 PIL 的图像格式转换器,单图像版,根据后缀自动调整格式。
from PIL import Image
import sys
with Image.open(sys.argv[1]) as im:
im.save(input("目标文件名(含后缀): "))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment