ci: add python script for batch svg to .ico conversion#71
Open
Cyklon3000 wants to merge 4 commits intoicon11-community:mainfrom
Open
ci: add python script for batch svg to .ico conversion#71Cyklon3000 wants to merge 4 commits intoicon11-community:mainfrom
Cyklon3000 wants to merge 4 commits intoicon11-community:mainfrom
Conversation
Author
|
This pr is rather a response to #11 with the mentioned complications to batch conversion than a serious addition to the repository. Rather the workflow, but I did not find the place to commit regarding this, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
svgfolder, 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
magickconsole 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.svgoverwritesfolder_icon.svgfor the sizes until and including 48px. After that the .ico is filled with with scaled versions offolder_icon.svgor other variants, for example a potentialfolder_icon-64px.svg