用 ImageMagick 转换图片为图标(多个尺寸)

与AutoHotkey相关的工具
tmplinshi
Posts: 1261
Joined: 01 Oct 2013, 14:57

用 ImageMagick 转换图片为图标(多个尺寸)

Post by tmplinshi » 18 Jan 2014, 11:01

命令行代码如下:

Code: Select all

convert input.png ^
        ( -clone 0 -resize 48x48 ) ^
        ( -clone 0 -resize 32x32 ) ^
        ( -clone 0 -resize 16x16 ) ^
        -delete 0 -alpha on -background none output.ico
或者写成一行:

Code: Select all

convert input.png ( -clone 0 -resize 48x48 ) ( -clone 0 -resize 32x32 ) ( -clone 0 -resize 16x16 ) -delete 0 -alpha on -background none output.ico

Return to “相关工具”