I've used StackBlur for image blurring but it is too slow for big resolution photos... so I decided to swith to GPUImage library as everyone says it's the best one to use.
I've used just this one line of code to implement blur using StackBlur:
_editedImage = [_myImage stackBlur:round(self.blurSlider.value)];
But I can't figure out how to use GPUImage in the same manner...
There are a lot of examples on the web, but they are all outdated because of GPUImage updates..
Could someone please help me to implement gaussian blur?
Sorry if this sounds very stupid...I am new to objective-c.
You'd want to do something like this (untested though, so it might not work the first time ;)
- (UIImage*)blurImage {
GPUImagePicture *source = [[GPUImagePicture alloc] initWithImage:self];
GPUImageiOSBlurFilter *blur = [[GPUImageiOSBlurFilter alloc] init];
blur.blurRadiusInPixels = 1.0f;
[source addTarget:blur];
[blur processImage];
return [blur imageFromCurrentFramebuffer];
}