ci: add python script for batch svg to .ico conversion #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This script allows for batch conversion of the .svg's in the
svg
folder, making it quicker to use the icons.This script allows for multiple .svg's to be combined in a single .ico file, as requested in #11.
By default the .ico sizes 16, 32, 48, 64, 256 are created, because windows only respects these intervals for folders.
The conversion takes place in a subprocess using ImageMagick with the
magick
console command. For the script to work therefore, an installation of ImageMagick to the path is required. This is still easier and quicker than previous solutions.The combination of multiple .svg's into a single .ico file is orchestrated under a new naming convention that appends the maximum size until which the base .svg is replaced in the .ico file with the smaller versions of the variant.
This way variants remain optional, but are made possible without adjustment in regular operation.
folder_icon-48px.svg
overwritesfolder_icon.svg
for the sizes until and including 48px. After that the .ico is filled with with scaled versions offolder_icon.svg
or other variants, for example a potentialfolder_icon-64px.svg