创建一个文件夹 必须要以iconset为后缀
mkdir hgl_pngpic.iconset
使用sips命令生成 10张小图
sips -z 16 16 $hgl --out hgl_pngpic.iconset/icon_16x16.png
sips -z 32 32 $hgl --out hgl_pngpic.iconset/icon_16x16@2x.png
sips -z 32 32 $hgl --out hgl_pngpic.iconset/icon_32x32.png
sips -z 64 64 $hgl --out hgl_pngpic.iconset/icon_32x32@2x.png
sips -z 128 128 $hgl --out hgl_pngpic.iconset/icon_128x128.png
sips -z 256 256 $hgl --out hgl_pngpic.iconset/icon_128x128@2x.png
sips -z 256 256 $hgl --out hgl_pngpic.iconset/icon_256x256.png
sips -z 512 512 $hgl --out hgl_pngpic.iconset/icon_256x256@2x.png
sips -z 512 512 $hgl --out hgl_pngpic.iconset/icon_512x512.png
sips -z 1024 1024 $hgl --out hgl_pngpic.iconset/icon_512x512@2x.png
使用iconutil命令将文件夹下的10张小图整合为一张icns图片
iconutil -c icns hgl_pngpic.iconset -o hgl.icns
标签:icns,Mac,pngpic,hgl,sips,iconset,out,png,图标
From: https://www.cnblogs.com/Doyoung/p/17309441.html