无法使用svglib将svg转换为png

时间:2020-08-06 19:07:26

标签: python-3.x svg

当我将svg转换为png时,出现了不完整的png文件和错误。请有人帮忙。

from reportlab.graphics import renderPM
from svglib.svglib import svg2rlg

svg_file = 'svgfile.svg'

drawing = svg2rlg(svg_file)
renderPM.drawToFile(drawing, "new_file.png", fmt="PNG")
Can't handle color: url(#a)
Can't handle color: url(#b)
Can't handle color: url(#c)

0 个答案:

没有答案
相关问题