📜  如何使用 python 代码示例将 eps 转换为 jpeg 或 png

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