Ale*_*sky 4 linux icons command-line
是否有任何适用于 Linux(或其他类 Unix 操作系统)的命令行实用程序可以:
例如:
% cool_icon_maker myimage_128x128.png file.ico
Run Code Online (Sandbox Code Playgroud)
在file.ico那里会自动将所有的图标大小128×128一样,64×64×64,32×32,16×16等。
我不知道多合一的解决方案,但我知道可以将两个部分组合在一起:
icotool,它可以创建/提取 .ico 文件。convert,它可以将文件转换和调整大小到所需的大小。所以,这样的事情会起作用(它可能只适用于带有“.png”扩展名的文件):
#!/bin/bash
# Just pass the original .png image as the only parameter to this script.
SOURCE="$1"
BASE=`basename "${SOURCE}" .png`
convert "${SOURCE}" -thumbnail 16x16 "${BASE}_16.png"
convert "${SOURCE}" -thumbnail 32x32 "${BASE}_32.png"
convert "${SOURCE}" -thumbnail 48x48 "${BASE}_48.png"
convert "${SOURCE}" -thumbnail 64x64 "${BASE}_64.png"
icotool -c -o "${BASE}.ico" "${BASE}"_{16,32,48,64}.png
rm -f "${BASE}"_{16,32,48,64}.png
Run Code Online (Sandbox Code Playgroud)
太丑了,我知道。但它很容易理解,并且有效(我测试过!)。请小心,因为它会在当前目录上创建临时文件,然后将其删除。
| 归档时间: |
|
| 查看次数: |
1510 次 |
| 最近记录: |