From 8493477cc71f4be6a4336d3e3830eed5e3f74c55 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Wed, 4 Aug 2021 11:20:31 +0200 Subject: [PATCH] Ports: Convert only first index of ico files When installing an icon, we fall back to a resizing strategy when an exact match on the image dimensions is missing. However, if we are dealing with an `.ico` file with multiple indices, `convert` will resize every separate index and will create multiple files. This changes makes sure we only resize the first index. A future improvement could be to select an index most closely matching the requested dimensions. --- Ports/.port_include.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 60d1dd76f4..dd925c65f3 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -127,7 +127,7 @@ install_icon() { if [ -n "$index" ]; then run convert "${icon}[${index}]" "app-${icon_size}.png" else - run convert "$icon" -resize $icon_size "app-${icon_size}.png" + run convert "$icon[0]" -resize $icon_size "app-${icon_size}.png" fi done run objcopy --add-section serenity_icon_s="app-16x16.png" "${DESTDIR}${launcher}"