mbcharbonneau / UIImage-Categories

🛠 A fork of Trevor Harmon's UIImage category methods, updated for the latest versions of iOS.
http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
MIT License
493 stars 152 forks source link

iOS 8 Warnings and some failed image resizes #22

Open Delta-38 opened 10 years ago

Delta-38 commented 10 years ago

I have been using these categories for a couple of months and I am generally very happy with their performance and ease of use. But after the release of iOS8 and XCode 6, at runtime, when resizing uiimages there are several CGContext path warnings launched:

Sep 23 13:40:14 Proxima-Centauri.local LiveBox[53941] : CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 192 bytes/row. Sep 23 13:40:14 Proxima-Centauri.local LiveBox[53941] : CGContextConcatCTM: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. Sep 23 13:40:14 Proxima-Centauri.local LiveBox[53941] : CGContextSetInterpolationQuality: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. Sep 23 13:40:14 Proxima-Centauri.local LiveBox[53941] : CGContextDrawImage: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. Sep 23 13:40:14 Proxima-Centauri.local LiveBox[53941] : CGBitmapContextCreateImage: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

But more seriously, some calls to - (UIImage *)thumbnailImage:(NSInteger)thumbnailSize transparentBorder:(NSUInteger)borderSize cornerRadius:(NSUInteger)cornerRadius interpolationQuality:(CGInterpolationQuality)quality end up return nil images on specific images. I have looked at the images in question and under iOS 7 they display fine and they appear to be valid images.

Let me know if I can help by supplying pictures or other data.

mbcharbonneau commented 10 years ago

Hey there! I've been looking for additional images to test some edge cases. If you could post the failing ones here that would be appreciated!

Delta-38 commented 9 years ago

Hi,

ok, I've got this one which consistently fails on iOS 8 (Flawless on 6.1 through 7.1) and I'll have users send other ones as they come in.

Specifically I use these resized with [thumbnailImage:44 transparentBorder:0 cornerRadius:0 interpolationQuality:3];

Thanks in advance, Paolo avatar3