Last active
July 9, 2024 16:17
-
-
Save a2sc/fbe87bf4cf78a547c3d88dbb063400de to your computer and use it in GitHub Desktop.
Create a favicon from a png image.
This file contains 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
# ImageMagick command to create a favicon from image.png | |
convert image.png -bordercolor white -border 0 \ | |
\( -clone 0 -resize 16x16 \) \ | |
\( -clone 0 -resize 32x32 \) \ | |
\( -clone 0 -resize 48x48 \) \ | |
\( -clone 0 -resize 64x64 \) \ | |
-delete 0 -alpha off -colors 256 favicon.ico | |
# Transparent background | |
convert favicon.png \ ok | |
\( -clone 0 -resize 16x16 \) \ | |
\( -clone 0 -resize 32x32 \) \ | |
\( -clone 0 -resize 48x48 \) \ | |
\( -clone 0 -resize 64x64 \) \ | |
-delete 0 -colors 256 favicon.ico |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source: https://www.imagemagick.org/Usage/thumbnails/#favicon