We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
老郭,debug模式下正常,但是在release模式下报错 unsupported parameter combination: 8 integer bits/component; 16 bits/pixel; 1-component color space; kCGImageAlphaPremultipliedLast; 96 bytes/row. 报错代码:在UIImage+BeeBeeExtension.m中:
(UIImage *)grayscale { CGSize size = self.size; CGRect rect = CGRectMake(0.0f, 0.0f, self.size.width, self.size.height);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); CGContextRef context = CGBitmapContextCreate(nil, size.width, size.height, 8, 0, colorSpace, CGImageGetBitmapInfo(self.CGImage));
BeeLog(@"size(%f,%f)",size.width,size.height); CGColorSpaceRelease(colorSpace);
CGContextDrawImage(context, rect, [self CGImage]); CGImageRef grayscale = CGBitmapContextCreateImage(context); CGContextRelease(context);
UIImage * image = [UIImage imageWithCGImage:grayscale]; CFRelease(grayscale);
return image; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
老郭,debug模式下正常,但是在release模式下报错
unsupported parameter combination: 8 integer bits/component; 16 bits/pixel; 1-component color space; kCGImageAlphaPremultipliedLast; 96 bytes/row.
报错代码:在UIImage+BeeBeeExtension.m中:
(UIImage *)grayscale
{
CGSize size = self.size;
CGRect rect = CGRectMake(0.0f, 0.0f, self.size.width, self.size.height);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
CGContextRef context = CGBitmapContextCreate(nil,
size.width,
size.height,
8,
0,
colorSpace,
CGImageGetBitmapInfo(self.CGImage));
BeeLog(@"size(%f,%f)",size.width,size.height);
CGColorSpaceRelease(colorSpace);
CGContextDrawImage(context, rect, [self CGImage]);
CGImageRef grayscale = CGBitmapContextCreateImage(context);
CGContextRelease(context);
UIImage * image = [UIImage imageWithCGImage:grayscale];
CFRelease(grayscale);
return image;
}
The text was updated successfully, but these errors were encountered: