Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add python script for batch svg to .ico conversion #71

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Cyklon3000
Copy link

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 overwrites folder_icon.svg for the sizes until and including 48px. After that the .ico is filled with with scaled versions of folder_icon.svg or other variants, for example a potential folder_icon-64px.svg

@Cyklon3000
Copy link
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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant