适配Iphone5时在模拟器里测试一切正常但在真机上却还是留有黑框

今天说是把适配好iphone5的程序在真机上跑一下,不跑不知道,一跑吓一跳,本来在模拟器里测的好好的,在iphone5真机上一跑却还是留有黑框,弄好大一会,终于知道问题出在什么地方了:原来是美工在用photoshop做首页启动图 Default-568h@2x.png 的时候 ,图片有一个属性 interlaced  ,做好后应该是 no interlaced 这个才行,把图再给美工让她把这个属性值改一下就OK了!!!

下面附上搜到的资料吧,要是看到的朋友希望对你们有所帮助:

转载自:http://blog.youkuaiyun.com/niitlcj/article/details/7891931

神奇的錯誤:pngcrush caught libpng error: Not enough image data

因為 XCode 4 編譯時對圖片所做的檢查比以前還嚴格,所以原本沒有的錯誤就突然這樣冒出來了,第一次看到還真的是一頭霧水,解決方式也是非常神奇,只要用 Photoshop 打開有問題的圖檔,並且在儲存的時候選擇非交錯模式(Not interlaced)即可。


转载自:http://stackoverflow.com/questions/5287600/build-app-with-xcode-4-it-always-show-some-error-about-png-image

When I build my app with Xcode 4 it always show this error message:

CopyPNGFile /Users/michaelchen/Library/Developer/Xcode/DerivedData/iMusicBox-boeawugacmhacbdtyymnprzfobyq/ArchiveIntermediates/iMusicBox/InstallationBuildProductsLocation/Applications/iMusicBox.app/list_cell.png Images/list_cell.png
    cd /Volumes/WORK/Works/iMusicBox
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" /Volumes/WORK/Works/iMusicBox/Images/list_cell.png /Users/michaelchen/Library/Developer/Xcode/DerivedData/iMusicBox-boeawugacmhacbdtyymnprzfobyq/ArchiveIntermediates/iMusicBox/InstallationBuildProductsLocation/Applications/iMusicBox.app/list_cell.png

While checking alphas in /Volumes/WORK/Works/iMusicBox/Images/list_cell.png pngcrush caught libpng error: Not enough image data

but It's OK with Xcode 3.2 - why?

share | improve this question
   

13 Answers

Found it!!

You have to save your PNG files as NOT INTERLACED. Try to open the file in photoshop (or similar), save as, and select "Not interlaced".

It is working in my case

hope this helps



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值