SVG转ICON
install
bash
apt install -y imagemagick
script
bash
#!/bin/bash
filename=$1
rm -f *.png *.ico
convert $filename -transparent white icon.png
convert $filename -transparent white -resize 256x256! icon.ico
convert $filename -transparent white -resize 128x128! favicon-128x128.png
convert $filename -transparent white -resize 96x96! favicon-96x96.png
convert $filename -transparent white -resize 32x32! favicon-32x32.png
convert $filename -transparent white -resize 16x16! favicon-16x16.png
script for tauri-app
bash
#!/bin/bash
filename=$1
rm -f *.png *.ico
convert $filename -transparent white -resize 128x128! icon.ico
convert $filename -transparent white -resize 512x512! icon.png
convert $filename -transparent white -resize 32x32! 32x32.png
convert $filename -transparent white -resize 128x128! 128x128.png
convert $filename -transparent white -resize 256x256! 128x128@2x.png
convert $filename -transparent white -resize 50x50! StoreLogo.png
convert $filename -transparent white -resize 30x30! Square30x30Logo.png
convert $filename -transparent white -resize 44x44! Square44x44Logo.png
convert $filename -transparent white -resize 71x71! Square71x71Logo.png
convert $filename -transparent white -resize 89x89! Square89x89Logo.png
convert $filename -transparent white -resize 107x107! Square107x107Logo.png
convert $filename -transparent white -resize 142x142! Square142x142Logo.png
convert $filename -transparent white -resize 150x150! Square150x150Logo.png
convert $filename -transparent white -resize 284x284! Square284x284Logo.png
convert $filename -transparent white -resize 310x310! Square310x310Logo.png