mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:07:45 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ install_icon() {
|
||||||
if [ -n "$index" ]; then
|
if [ -n "$index" ]; then
|
||||||
run convert "${icon}[${index}]" "app-${icon_size}.png"
|
run convert "${icon}[${index}]" "app-${icon_size}.png"
|
||||||
else
|
else
|
||||||
run convert "$icon" -resize $icon_size "app-${icon_size}.png"
|
run convert "$icon[0]" -resize $icon_size "app-${icon_size}.png"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
run objcopy --add-section serenity_icon_s="app-16x16.png" "${DESTDIR}${launcher}"
|
run objcopy --add-section serenity_icon_s="app-16x16.png" "${DESTDIR}${launcher}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue