-
-
Save azam/3b6995a29b9f079282f3 to your computer and use it in GitHub Desktop.
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico |
For anyone else wondering why the density must be set
@mjhasbach @azam @keith24 I'm still getting blurry images with this. Is there an icon:auto-density ?
@graingert I got better results by using -density 256x256
as specified in this SO answer.
So to sumarize, use:
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico
This can be done in magick directly:
magick -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico
Updated with latest working parameters. Thanks all !
Hi there, I'm jumping into this thread long after the previous post... But this command gives me a multi-sized ICO as expected, but all dimensions are completely white (or any color I specify as the background
parameter)... I don't find any clue about it for now...
If you want your favicon contain only certain sizes, you can specify them by setting `icon:auto-resize=64,48,32,16". This will lead to a much smaller file.
Full command:
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize=64,48,32,16 -colors 256 favicon.ico
My .ico also has white background when using this command:
magick favicon.svg -density 256x256 -background transparent -colors 256 -define icon:auto-resize="128,64,48,32,16" favicon.ico
What I'm doing wrong?
The icon can also be colored: