Bug 47368 - Appliance branding: portrait SVG logos for welcome screen are cut off
Appliance branding: portrait SVG logos for welcome screen are cut off
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: General
UCS 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
: 46044 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-18 11:03 CEST by Nico Gulden
Modified: 2021-05-14 16:34 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018070521000567
Bug group (optional): Appliance
Max CVSS v3 score:


Attachments
SVG logo in portrait format causing the problem (1.57 KB, image/svg+xml)
2018-07-18 11:04 CEST, Nico Gulden
Details
Rendered PNG showing the problem (2.92 KB, image/png)
2018-07-18 11:05 CEST, Nico Gulden
Details
Rendered PNG show the result after patch has been applied (2.64 KB, image/png)
2018-07-18 11:06 CEST, Nico Gulden
Details
Patch for render-css-background.js (525 bytes, patch)
2018-07-18 11:07 CEST, Nico Gulden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Gulden univentionstaff 2018-07-18 11:03:45 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.
Comment 1 Nico Gulden univentionstaff 2018-07-18 11:04:26 CEST
Created attachment 9598 [details]
SVG logo in portrait format causing the problem
Comment 2 Nico Gulden univentionstaff 2018-07-18 11:05:09 CEST
Created attachment 9599 [details]
Rendered PNG showing the problem
Comment 3 Nico Gulden univentionstaff 2018-07-18 11:06:00 CEST
Created attachment 9600 [details]
Rendered PNG show the result after patch has been applied
Comment 4 Nico Gulden univentionstaff 2018-07-18 11:07:22 CEST
Created attachment 9601 [details]
Patch for render-css-background.js
Comment 5 Nico Gulden univentionstaff 2018-07-18 11:09:23 CEST
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.
Comment 6 Nico Gulden univentionstaff 2018-07-18 11:16:14 CEST
*** Bug 46044 has been marked as a duplicate of this bug. ***
Comment 7 Nico Gulden univentionstaff 2018-07-20 15:49:08 CEST
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).
Comment 8 Ingo Steuwer univentionstaff 2021-05-14 15:42:05 CEST
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.