首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >图标集:错误:无法生成ICNS

图标集:错误:无法生成ICNS
EN

Stack Overflow用户
提问于 2015-07-26 08:09:46
回答 1查看 4.6K关注 0票数 10

我正在尝试为一个应用程序创建一个图标集,但是当我这样做的时候总是得到一个错误:Hexchat.iconset:error: Failed to generate ICNS.

我尝试了从Illustrator单独导出.png文件,以及使用脚本。使用1024x1024png文件作为Hexchat_8.png的当前脚本为:

代码语言:javascript
运行
复制
mkdir Hexchat.iconset
sips -z 16 16     Hexchat_8.png --out Hexchat.iconset/hexchat_16x16.png
sips -z 32 32     Hexchat_8.png --out Hexchat.iconset/hexchat_16x16@2x.png
sips -z 32 32     Hexchat_8.png --out Hexchat.iconset/hexchat_32x32.png
sips -z 64 64     Hexchat_8.png --out Hexchat.iconset/hexchat_32x32@2x.png
sips -z 128 128   Hexchat_8.png --out Hexchat.iconset/hexchat_128x128.png
sips -z 256 256   Hexchat_8.png --out Hexchat.iconset/hexchat_128x128@2x.png
sips -z 256 256   Hexchat_8.png --out Hexchat.iconset/hexchat_256x256.png
sips -z 512 512   Hexchat_8.png --out Hexchat.iconset/hexchat_256x256@2x.png
sips -z 512 512   Hexchat_8.png --out Hexchat.iconset/hexchat_512x512.png
cp Hexchat_8.png Hexchat.iconset/hexchat_512x512@2x.png
iconutil -c icns Hexchat.iconset
rm -R Hexchat.iconset

不管有没有输出文件,每次都是一样的:

代码语言:javascript
运行
复制
iconutil -c icns Hexchat.iconset
Hexchat.iconset:error: Failed to generate ICNS.

iconutil -c icns Hexchat.iconset -o hexchat.icns
Hexchat.iconset:error: Failed to generate ICNS.

chmod‘’ing和/或sudo不起作用,并且手册页没有显示详细错误输出的选项。我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2015-09-10 07:04:44

将您的文件名从hexchat_16x16.png更改为icon_16x16.png,其他所有大小也是如此。

我只是遇到了同样的错误,名称类似于myappicon16x16.png,并且不能理解它为什么会失败。

我很想知道这一点,但在看到你的问题后,我找到了这个StackOverflow answer

票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31632304

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档