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:
Côme Chilliet 2026-01-20 11:44:45 +01:00 committed by backportbot[bot]
parent 2f1de7999f
commit 02bbce389e

View file

@ -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);