mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
fix(theming): Fix favicon and touchicon ratios
On some systems (depending on imagick version I think) the ratio would be messed up on the touchicon, favicon and link preview images. This fixes it without breaking other systems. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
2f1de7999f
commit
02bbce389e
1 changed files with 2 additions and 3 deletions
|
|
@ -136,9 +136,8 @@ class IconBuilder {
|
|||
|
||||
// convert svg to resized image
|
||||
$appIconFile = new Imagick();
|
||||
$resX = (int)(72 * $size / $x);
|
||||
$resY = (int)(72 * $size / $y);
|
||||
$appIconFile->setResolution($resX, $resY);
|
||||
$res = (int)(72 * $size / max($x, $y));
|
||||
$appIconFile->setResolution($res, $res);
|
||||
$appIconFile->setBackgroundColor(new ImagickPixel('transparent'));
|
||||
$appIconFile->readImageBlob($svg);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue