Support SVG to PNG conversion without Inkscape
Closed this issue · 2 comments
asfaltboy commented
E.g with something like Kozea/CairoSVG, by including it in the dependencies and replacing lines
Lines 45 to 49 in d746569
with something like:
import cairosvg # put me in the top
new_svg = base_svg.read_text(encoding='utf-8').format(**locals())
png_filename = str(output_filename).replace("svg", "png")
cairosvg.svg2pdf(file_obj=new_svg, write_to=png_filename)
cassiobotaro commented
asfaltboy commented
Unfortunately, I know little to nothing about SVG format or Cairo .. could you file a bug in https://github.com/Kozea/CairoSVG/issues with any additional details you have?