我试图找到将 .WMF 图像文件转换为 .png 的解决方案,不幸的是我无法在 pyhton 中渲染 .wmf 文件(在 Windows 机器上)。有人对此有解决方案吗?
我尝试过的最简单的示例之一如下(Python 3.6):
from PIL import Image
Image.open("test.wmf").save("test.png")
但得到错误:
File "C:\Python36\lib\site-packages\PIL\WmfImagePlugin.py", line 58, in load
Image.core.drawwmf(im.fp.read(), im.size, self.bbox),
OSError: cannot render metafile
先感谢您