在我的应用程序中,我需要调整大小并裁剪一些本地和在线存储的图像.我正在使用Trevor Harmon的教程实现UIImage+Resize.
在我的iPhone 4(iOS 4.3.1)上一切正常,我没有问题.但是在我的iPhone 3G(iOS 3.2)上,调整大小和裁剪方法对任何图片都不起作用(本地存储的是PNG).这是控制台输出:
Tue Apr 5 02:34:44 Andreis-MacBook-Pro.local Puzzle[12453] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 288 bytes/row.
Tue Apr 5 02:34:44 Andreis-MacBook-Pro.local Puzzle[12453] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 288 bytes/row.
Tue Apr 5 02:34:44 Andreis-MacBook-Pro.local Puzzle[12453] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 288 bytes/row.
Tue Apr 5 …Run Code Online (Sandbox Code Playgroud) 我正在横向和纵向模式上传从iphone点击的图像.具有横向模式的图像上传得很好,但问题在于以纵向模式上传的图像.它们旋转了90度.
其他具有纵向模式的图像(不是从iPhone点击)工作正常.
知道为什么会这样吗?