summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-12-09 11:51:02 +0100
committerJulius Haertl <jus@bitgrid.net>2016-12-09 11:53:27 +0100
commit366f14d7dbcd2fb68816f3143470044df7e1c6ca (patch)
tree7d85ccc6c6e50310fc7c6829e8e4571b10053d2e /apps/theming
parent60e4299bcbf441a45605ae3a8f7cb74afd00301d (diff)
downloadnextcloud-server-366f14d7dbcd2fb68816f3143470044df7e1c6ca.tar.gz
nextcloud-server-366f14d7dbcd2fb68816f3143470044df7e1c6ca.zip
Add fallback to FILTER_LANCZOS for icon resizing
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/IconBuilder.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php
index 9cf0d051304..7134fb58cfc 100644
--- a/apps/theming/lib/IconBuilder.php
+++ b/apps/theming/lib/IconBuilder.php
@@ -159,7 +159,12 @@ class IconBuilder {
$finalIconFile->setImageArtifact('compose:args', "1,0,-0.5,0.5");
$finalIconFile->compositeImage($appIconFile, Imagick::COMPOSITE_ATOP, $offset_w, $offset_h);
$finalIconFile->setImageFormat('png24');
- $finalIconFile->resizeImage($size, $size, Imagick::INTERPOLATE_BICUBIC, 1, false);
+ if (defined("Imagick::INTERPOLATE_BICUBIC") === true) {
+ $filter = Imagick::INTERPOLATE_BICUBIC;
+ } else {
+ $filter = Imagick::FILTER_LANCZOS;
+ }
+ $finalIconFile->resizeImage($size, $size, $filter, 1, false);
$appIconFile->destroy();
return $finalIconFile;