📅  最后修改于: 2022-03-11 14:45:26.497000             🧑  作者: Mango
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