I'm using GPUImage for blur effect and I make my side menu background blur (it's POC code):
UIImage *currentScreenShotImage = [Util screenshot];
GPUImageView *blurView = [[GPUImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 568)];
blurView.clipsToBounds = YES;
blurView.layer.contentsGravity = kCAGravityTop;
GPUImageiOSBlurFilter *blurFilter = [[GPUImageiOSBlurFilter alloc] init];
blurFilter.blurRadiusInPixels = 8.0f;
GPUImagePicture *picture = [[GPUImagePicture alloc] initWithImage:currentScreenShotImage];
[picture addTarget:blurFilter];
[blurFilter addTarget:blurView];
[picture processImageWithCompletionHandler:^{
[blurFilter removeAllTargets];
}];
processImageWithCompletionHandler
- The method that actually process and blur the screenshot takes 1 second (which is a lot!).
How can I make it faster or someone have different trick than screenshot?