anpassung für transparente png konvertierung
This commit is contained in:
+5
-5
@@ -21,7 +21,6 @@ def create_picture_frame( config ):
|
||||
params = dict()
|
||||
params['width'] = config.get('globals', 'width')
|
||||
params['height'] = config.get('globals', 'height')
|
||||
params['background'] = config.get('globals', 'background')
|
||||
|
||||
#echo '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">'
|
||||
begintpl = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
@@ -34,14 +33,15 @@ def create_picture_frame( config ):
|
||||
height="${height}"
|
||||
>
|
||||
'''
|
||||
imagetpl = ''' <image width="${width}" height="${height}"
|
||||
xlink:href="file://${background}">
|
||||
</image>
|
||||
'''
|
||||
svgbegin = Template( begintpl ).substitute(params)
|
||||
# falls ein Hintergrundbild verwendet werden soll, dann das genauso gross
|
||||
# machen...
|
||||
try:
|
||||
params['background'] = config.get('globals', 'background')
|
||||
imagetpl = ''' <image width="${width}" height="${height}"
|
||||
xlink:href="file://${background}">
|
||||
</image>
|
||||
'''
|
||||
background = config.get('globals', 'background')
|
||||
font_path = os.path.expandvars(os.path.join('$PICCREATE_BACKGROUNDS', background ))
|
||||
params['background'] = os.path.normpath(font_path)
|
||||
|
||||
Reference in New Issue
Block a user