📜  python 将 png 转换为 jpg - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:26.497000             🧑  作者: Mango

代码示例2
from PIL import Image

img=Image.open("File.eps") # Path to eps file
fig=img.convert("RGBA")
fig.save("File.png") # Path where new image is to be saved

# If you get an OSError, check out this link:
# https://www.tutorialexample.com/python-convert-eps-to-png-with-pillow-a-beginner-guide-python-tutorial/

# If you get a FileNotFoundError associating "gs":
# https://stackoverflow.com/questions/34564145/python-no-such-file-or-directory-gs-error-even-with-ghostscript-installed-o