Skip to content

Commit

Permalink
Use --export-filename instead of the deprecated --export-png
Browse files Browse the repository at this point in the history
This was suggested in voc#42 and prevents a warning when using Inkscape.
  • Loading branch information
mstock committed Jul 16, 2021
1 parent e71ae01 commit 2bcb0c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def renderFrame(svg, task, outfile):
converted.save(filename=outfile)
else:
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
cmd = 'inkscape --export-background=white --export-background-opacity=0 --export-width={1} --export-height={2} --export-png="{3}" --pipe 2>&1 >/dev/null'.format(task.workdir, width, height, outfile)
cmd = 'inkscape --export-background=white --export-background-opacity=0 --export-width={1} --export-height={2} --export-filename="{3}" --pipe 2>&1 >/dev/null'.format(task.workdir, width, height, outfile)
errorReturn = subprocess.check_output(cmd, shell=True, universal_newlines=True, input=svg.svgstr, stderr=subprocess.STDOUT, cwd=task.workdir)
if errorReturn != '':
print("inkscape exitted with error\n" + errorReturn)
Expand Down

0 comments on commit 2bcb0c6

Please sign in to comment.