gpn20: improve intros
This commit is contained in:
parent
5063f71f72
commit
454197fc18
4 changed files with 42 additions and 49 deletions
|
@ -132,15 +132,15 @@ def debug():
|
|||
'../intro.ts',
|
||||
introFrames,
|
||||
{
|
||||
'$title': "Long Long Long title is LONG",
|
||||
'$title': "Long Long Long title is LONG ",
|
||||
'$speaker': 'Long Name of Dr. Dr. Prof. Dr. Long Long'
|
||||
}
|
||||
)
|
||||
|
||||
render('outro.svg',
|
||||
'../outro.ts',
|
||||
outroFrames
|
||||
)
|
||||
#render('outro.svg',
|
||||
# '../outro.ts',
|
||||
# outroFrames
|
||||
#)
|
||||
|
||||
|
||||
def tasks(queue, args, idlist, skiplist):
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
version="1.1"
|
||||
id="SVGRoot"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
||||
sodipodi:docname="intro-2.svg">
|
||||
sodipodi:docname="intro.svg"
|
||||
enable-background="new">
|
||||
<defs
|
||||
id="defs815">
|
||||
<linearGradient
|
||||
|
@ -86,8 +87,8 @@
|
|||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="1676.0588"
|
||||
inkscape:cy="531.20051"
|
||||
inkscape:cx="810.40454"
|
||||
inkscape:cy="499.40849"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer3"
|
||||
showgrid="false"
|
||||
|
@ -3085,7 +3086,7 @@
|
|||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="texte"
|
||||
style="opacity:1">
|
||||
style="opacity:1;">
|
||||
<rect
|
||||
style="opacity:0;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.54968041;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect16064-4"
|
||||
|
@ -3104,49 +3105,29 @@
|
|||
ry="0" />
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;line-height:125%;font-family:Roboto;-inkscape-font-specification:'Roboto, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
|
||||
id="title"><flowRegion
|
||||
id="flowRegion16068"
|
||||
style="fill:#f0f0f0;fill-opacity:1;-inkscape-font-specification:'Roboto, Normal';font-family:Roboto;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:80px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"><use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect16064"
|
||||
id="use16070"
|
||||
width="100%"
|
||||
height="100%" /></flowRegion><flowPara
|
||||
id="flowPara16072"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;font-family:Roboto;-inkscape-font-specification:'Roboto, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr;text-anchor:start;fill:#f0f0f0;fill-opacity:1;">$title</flowPara></flowRoot> <rect
|
||||
style="opacity:0;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:#0000ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect16050"
|
||||
width="937.14288"
|
||||
height="511.42859"
|
||||
x="912.85712"
|
||||
y="57.142857" />
|
||||
<rect
|
||||
style="opacity:0;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:#0000ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect16052"
|
||||
width="181.42857"
|
||||
height="17.142857"
|
||||
x="937.14288"
|
||||
y="158.57143" />
|
||||
<rect
|
||||
style="opacity:0;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:#0000ff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect16054"
|
||||
width="135.71431"
|
||||
height="165.71428"
|
||||
x="912.85712"
|
||||
y="57.142857" />
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333333px;line-height:125%;font-family:Roboto;-inkscape-font-specification:'Roboto, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#f0f0f0;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333206px;line-height:125%;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
id="persons"><flowRegion
|
||||
id="flowRegion16091"
|
||||
style="-inkscape-font-specification:'Roboto, Normal';font-family:Roboto;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;font-size:53.33333333px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"><use
|
||||
id="flowRegion3669"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:53.33333206px;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;"><use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect16064-4"
|
||||
id="use16093"
|
||||
id="use3671"
|
||||
width="100%"
|
||||
height="100%" /></flowRegion><flowPara
|
||||
id="flowPara18101">$persons</flowPara></flowRoot> </g>
|
||||
id="flowPara3673"
|
||||
style="-inkscape-font-specification:Roboto;font-family:Roboto;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal">$persons</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80px;line-height:125%;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
id="title"><flowRegion
|
||||
id="flowRegion4931"
|
||||
style="fill:#ffffff;fill-opacity:1;"><use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect16064"
|
||||
id="use4933"
|
||||
width="100%"
|
||||
height="100%" /></flowRegion><flowPara
|
||||
id="flowPara4935"
|
||||
style="-inkscape-font-specification:Roboto;font-family:Roboto;font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal">$title</flowPara></flowRoot> </g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 136 KiB |
4
make.py
4
make.py
|
@ -52,6 +52,10 @@ parser.add_argument('--imagemagick', action="store_true", default=False, help=''
|
|||
Render frames using ImageMagick instead of Inkscape.
|
||||
Usage: ./make.py yourproject/ --imagemagick
|
||||
''')
|
||||
parser.add_argument('--resvg', action="store_true", default=False, help='''
|
||||
Render frames using resvg instead of Inkscape.
|
||||
Usage: ./make.py yourproject/ --resvg
|
||||
''')
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
|
|
10
renderlib.py
10
renderlib.py
|
@ -91,12 +91,20 @@ def renderFrame(infile, task, outfile):
|
|||
with Image(filename=infile) as img:
|
||||
with img.convert('png') as converted:
|
||||
converted.save(filename=outfile)
|
||||
elif args.resvg:
|
||||
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
|
||||
cmd = 'resvg --background white --width={1} --height={2} "{4}" "{3}" 2>&1 >/dev/null'.format(task.workdir, width, height, outfile, infile)
|
||||
errorReturn = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT, cwd=task.workdir)
|
||||
if errorReturn != '':
|
||||
print("resvg exited with error\n" + errorReturn)
|
||||
# sys.exit(42)
|
||||
|
||||
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}" "{4}" 2>&1 >/dev/null'.format(task.workdir, width, height, outfile, infile)
|
||||
errorReturn = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT, cwd=task.workdir)
|
||||
if errorReturn != '':
|
||||
print("inkscape exitted with error\n" + errorReturn)
|
||||
print("inkscape exited with error\n" + errorReturn)
|
||||
# sys.exit(42)
|
||||
|
||||
def cachedRenderFrame(frame, frameNr, task, cache):
|
||||
|
|
Loading…
Add table
Reference in a new issue