From 0bdc90da8504c07771264ebea341bda49969bb13 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 20 Dec 2022 09:38:42 +0100 Subject: [PATCH] wip #5661 @0.5 --- src/CommandLine/Imagemagick/Ico.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/CommandLine/Imagemagick/Ico.php diff --git a/src/CommandLine/Imagemagick/Ico.php b/src/CommandLine/Imagemagick/Ico.php new file mode 100644 index 0000000..9c9786c --- /dev/null +++ b/src/CommandLine/Imagemagick/Ico.php @@ -0,0 +1,27 @@ +getSrc()); + $sourceSize = min($sourceSize[0], $sourceSize[1]); + $sizes = []; + foreach ($allSizes as $s) { + if ($s > $sourceSize) { + continue; + } + $sizes[] = $s; + } + + $this->setManualArg('-define icon:auto-resize=' . implode(',', $sizes)); + } +} \ No newline at end of file -- 2.39.5