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
My image is 8 bit gray image, when I blur it, it crashed
I fixed by this code:
- (UIImage *)blurredImageWithRadius:(CGFloat)radius iterations:(NSUInteger)iterations tintColor:(UIColor *)tintColor { //image must be nonzero size if (floorf(self.size.width) * floorf(self.size.height) <= 0.0f) return self; //boxsize must be an odd integer uint32_t boxSize = (uint32_t)(radius * self.scale); if (boxSize % 2 == 0) boxSize ++; //create image buffers CGImageRef imageRef = self.CGImage; // Here:fix crash size_t sizeBit = CGImageGetBitsPerPixel(imageRef); if (sizeBit == 8) { return self; } ... }
The text was updated successfully, but these errors were encountered:
Try this fork: https://github.com/Vienta/FXBlurView It adds conversion of non-ARGB8888 images into ARGB8888.
Sorry, something went wrong.
No branches or pull requests
My image is 8 bit gray image, when I blur it, it crashed
I fixed by this code:
The text was updated successfully, but these errors were encountered: