diff options
author | Joas Schilling <coding@schilljs.com> | 2016-12-09 14:53:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 14:53:34 +0100 |
commit | de8908bf29d1e23f1ce5a41fcde02e1bf588b1a4 (patch) | |
tree | 6bbae7ff9a69111ce0f67d643137f60698f0aa11 /apps | |
parent | 49473dee85b0b7f004c7fd34acee1d1c3c7fe09e (diff) | |
parent | 366f14d7dbcd2fb68816f3143470044df7e1c6ca (diff) | |
download | nextcloud-server-de8908bf29d1e23f1ce5a41fcde02e1bf588b1a4.tar.gz nextcloud-server-de8908bf29d1e23f1ce5a41fcde02e1bf588b1a4.zip |
Merge pull request #2584 from nextcloud/theming-filter-fix
Add fallback to FILTER_LANCZOS for icon resizing
Diffstat (limited to 'apps')
-rw-r--r-- | apps/theming/lib/IconBuilder.php | 7 |
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; |