Univention Bugzilla – Bug 47368
Appliance branding: portrait SVG logos for welcome screen are cut off
Last modified: 2021-05-14 16:34:21 CEST
For the welcome screen the appliance branding uses phantomjs to convert the SVG file to a PNG file with 120px * 120px in size. This works good for SVG logos in landscape format (width > height). But for logos in portrait format (width < height), the rendered png is cut at the buttom. I could fix this issue by changing one line in the render-css-background.js file used by phantomjs: https://git.knut.univention.de/univention/ucs/blob/4.3-1/base/univention-app-appliance/tools/render-css-background.js#L63 A patch will be attached as well as some files showing the problem and the results.
Created attachment 9598 [details] SVG logo in portrait format causing the problem
Created attachment 9599 [details] Rendered PNG showing the problem
Created attachment 9600 [details] Rendered PNG show the result after patch has been applied
Created attachment 9601 [details] Patch for render-css-background.js
Workaround: Use a SVG logo in landscape format. If the giving logo is in portrait format, change the document size in the document settings (e.g. in Inkscape) so that width > height.
*** Bug 46044 has been marked as a duplicate of this bug. ***
I just also had a 1:1 side ratio logo and for the bootsplash it was cut off at the bottom. Therefore, this bug is not only restricted to the welcome screen image. It is valid for all conversions done with phantomjs. Workaround: The SVG files need to have landscape orientation (width > height).
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.