Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

extract ipa png icon failed #6

Closed
red3 opened this issue Jan 18, 2017 · 9 comments
Closed

extract ipa png icon failed #6

red3 opened this issue Jan 18, 2017 · 9 comments

Comments

@red3
Copy link

red3 commented Jan 18, 2017

处理 icon 的时候报错:

/Users/herui/.ipapk-server/icon/46bf9893-685e-40d0-bbcf-8826e57fc867.png : not an -iphone crushed PNG file

应该是 extractIpaIcon 这个函数里面 fs.writeFile报的错。

我的尝试:

  1. 确保 icon 是 png,同时试了上传微信的 ipa 包还是报这个错误
  2. ios-ipa-server 项目是可以成功显示图片的,我看了下,他用的是 fs.writeFileSync,但是也会有报警:libpng warning: Input PNG is not optimized for iPhone OS. Copying source file to destination...

还是说我的 libpng 版本有问题?

@zhao0
Copy link
Owner

zhao0 commented Jan 18, 2017

普通情况下ipa里面的png图片会经过pngcrush压缩,报错是这个图片没有经过pngcrush压缩,我今天加个处理,没有压缩过就直接解压

@red3
Copy link
Author

red3 commented Jan 18, 2017

按说我在 iTunes 中下载的微信的安装包应该是经过 pngcrush 压缩的才对吧?

@zhao0
Copy link
Owner

zhao0 commented Jan 18, 2017

不一定是

@red3
Copy link
Author

red3 commented Jan 18, 2017

我查了下,找到这个链接:https://discussions.apple.com/thread/7263918?start=0&tstart=0

可能是这样:
用 xcassets 管理 appicon 后,xcassets 里面 png 文件不会被压缩了吧

@zhao0
Copy link
Owner

zhao0 commented Jan 18, 2017

这个我不太清楚,我要兼容两种

@red3
Copy link
Author

red3 commented Jan 18, 2017

好的

@zhao0
Copy link
Owner

zhao0 commented Jan 18, 2017

我更新到0.2.4了,你试一下

@red3
Copy link
Author

red3 commented Jan 18, 2017

👍 可以了,关闭这个 issue 吧

@zhao0
Copy link
Owner

zhao0 commented Jan 18, 2017

感谢反馈,比心

@zhao0 zhao0 closed this as completed Jan 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants