hi man

博客园 首页 新随笔 联系 订阅 管理

 

有的PNG在MAC下可以显示,但拿到WINDOWS下就不能显示。就是因为这些文件是经过xcode编译优化过的,所以无法直接查看。

 

我看网上说是 "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush
\ -revert-iphone-optimizations -q Local.png Local-standard.png" 这个,但我在自己的MAC(4.4)上没找到。

-------------------------------------------------------------------------------------------------------------------------

用下面命令查看 XCode folder 路径信息

命令: xcode-select -print-path

显示: /Applications/Xcode.app/Contents/Developer/

 -------------------------------------------------------------------------------------------------------------------------

最后用下面的命令搞定了

命令: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -revert-iphone-optimizations /other/bbbbbc/a94@2x.png /other/bbbbbc/test11111.png

 -------------------------------------------------------------------------------------------------------------------------

批处理还原指定的图片(下面就是把/other/new/*.png 还原到 /other/new1 文件夹中)

命令: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir /other/new1  -revert-iphone-optimizations -q /other/new/*.png

 

 

posted on 2012-11-20 10:32  KuPig  阅读(3024)  评论(0编辑  收藏  举报