Converting GIF's, PNG's and JPG's to .ICO files using Imagemagick

前端 未结 3 1193
青春惊慌失措
青春惊慌失措 2020-12-23 02:09

From: JPG, To: ICO;

/usr/bin/convert -resize x16 -gravity center -crop 16x16+0+0 input.jpg \\
-transparent white -colors 256 output/favicon.ico 
3条回答
  •  时光取名叫无心
    2020-12-23 03:00

    Add this option to convert:

    -background transparent
    

    However, keep in mind that your original image must actually have an alpha channel. PNGs may have an alpha channel, JPEGs do not.

提交回复
热议问题