force export-size
This commit is contained in:
parent
b8d12c9c21
commit
c23c8b9dfe
1 changed files with 8 additions and 1 deletions
|
@ -128,8 +128,15 @@ def rendertask(task):
|
||||||
# write the generated svg-text into the output-file
|
# write the generated svg-text into the output-file
|
||||||
fp.write( etree.tostring(svg, encoding='unicode') )
|
fp.write( etree.tostring(svg, encoding='unicode') )
|
||||||
|
|
||||||
|
if task.outfile.endswith('.ts'):
|
||||||
|
width = 1920
|
||||||
|
height = 1080
|
||||||
|
else:
|
||||||
|
width = 1024
|
||||||
|
height = 576
|
||||||
|
|
||||||
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
|
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
|
||||||
errorReturn = subprocess.check_output('cd {0} && inkscape --export-background=white --export-png=$(pwd)/.frames/{1:04d}.png $(pwd)/.gen.svg 2>&1 >/dev/null'.format(task.workdir, frameNr), shell=True, universal_newlines=True)
|
errorReturn = subprocess.check_output('cd {0} && inkscape --export-background=white --export-width={2} --export-height={3} --export-png=$(pwd)/.frames/{1:04d}.png $(pwd)/.gen.svg 2>&1 >/dev/null'.format(task.workdir, frameNr, width, height), shell=True, universal_newlines=True)
|
||||||
if errorReturn != '':
|
if errorReturn != '':
|
||||||
print("inkscape exitted with error\n"+errorReturn)
|
print("inkscape exitted with error\n"+errorReturn)
|
||||||
sys.exit(42)
|
sys.exit(42)
|
||||||
|
|
Loading…
Add table
Reference in a new issue