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.
This commit is contained in:
parent
546af2d9ef
commit
8493477cc7
Notes:
sideshowbarker
2024-07-18 07:29:50 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/8493477cc71 Pull-request: https://github.com/SerenityOS/serenity/pull/9203 Reviewed-by: https://github.com/linusg
1 changed files with 1 additions and 1 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Reference in a new issue