本来app在iPhone6 iOS8系统上运行得好好的,用iPhone5 iOS7测试了一下一启动就crash,报了下面的错:
2015-06-12 09:31:56.509 app[8582:60b] Unsupported pixel format in CSI
Jun 12 09:31:56 MyPhone app[8582] <Error>: CGImageCreate: invalid image size: 0 x 0.
2015-06-12 09:31:56.512 app[8582:60b] Unsupported pixel format in CSI
Jun 12 09:31:56 MyPhone app[8582] <Error>: CGImageCreate: invalid image bits/pixel or bytes/row.
Unable to create image from csi bitmap data
2015-06-12 09:31:56.514 app[8582:60b] *** -[_CUIThemePixelRendition isHeaderFlaggedFPO]: message sent to deallocated instance 0x18b3ec50
发现最后的堆栈位置在[UIImage imageNamed:@"defaulticon"]这句代码上,这能有什么问题?难道找不到图片?在Images.xcassets找到对应的图片右键选择”show in finder“,发现居然是jpg格式的,我的天,疏忽了。iPhone6 iOS8系统上就没问题说明新系统做了优化啊。
至于为什么不小心变成了jpg格式,应该是自己使用系统自带的”预览“调整图片大小时,自动保存格式为jpg格式了