I have tried gaussian blur and checked out all the questions on stackoverflow but no one of them solved my crash issue.Please help is there is any other way to blur image other
Not sure about how to blur an image.
This may help is you want to blur an UIImageView or any view
.
UIView *myView = self.theImageView;
CALayer *layer = [myView layer];
[layer setRasterizationScale:0.25];
[layer setShouldRasterize:YES];
You can undo it by setting the rasterization scale back to 1.
[layer setRasterizationScale:1.0];
UPDATE:
The below Apple sample code includes a blur/sharp effect. (using Open GL) See if it helps, http://developer.apple.com/library/ios/#samplecode/GLImageProcessing/Introduction/Intro.html
I've made a small StackBlur extension to UIImage. StackBlur is close to GaussianBlur but much faster.
Check it at: https://github.com/tomsoft1/StackBluriOS
tiny note... there's a typo just on that ReadMe, "normalized" for "normalize"
What you probably want is a Box Blur algorithm. It is about 10 times faster than Gaussian blur and produces nice results. I have the code running on Android, I just haven't ported it to iOS yet. Here is the source.
Should only take about 10 minutes to port to iOS. The functions will work as is, you just need to access the image bytes (as you are doing in the source code above) and feed them to functions.