From 08ad0e196a4dea5b252b24e7175ddb0ac2ed2f46 Mon Sep 17 00:00:00 2001 From: Juan Felipe Alvarez Saldarriaga Date: Thu, 19 Dec 2013 11:58:55 -0500 Subject: [PATCH] fix blur size property removed from gpuimage. gpuimage has removed blurSize property, I just change it to the new one in order to work with the last stable gpuimage release, 0.1.2. See the issue reported here: https://github.com/gobackspaces/DLCImagePickerController/issues/45. --- Classes/DLCImagePickerController.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/DLCImagePickerController.m b/Classes/DLCImagePickerController.m index d72ab85..1e0628f 100644 --- a/Classes/DLCImagePickerController.m +++ b/Classes/DLCImagePickerController.m @@ -353,7 +353,7 @@ -(IBAction) toggleBlur:(UIButton*)blurButton { blurFilter = [[GPUImageGaussianSelectiveBlurFilter alloc] init]; [(GPUImageGaussianSelectiveBlurFilter*)blurFilter setExcludeCircleRadius:80.0/320.0]; [(GPUImageGaussianSelectiveBlurFilter*)blurFilter setExcludeCirclePoint:CGPointMake(0.5f, 0.5f)]; - [(GPUImageGaussianSelectiveBlurFilter*)blurFilter setBlurSize:kStaticBlurSize]; + [(GPUImageGaussianSelectiveBlurFilter*)blurFilter setBlurRadiusInPixels:kStaticBlurSize]; [(GPUImageGaussianSelectiveBlurFilter*)blurFilter setAspectRatio:1.0f]; } hasBlur = YES; @@ -518,20 +518,20 @@ -(IBAction) handlePan:(UIGestureRecognizer *) sender { if ([sender state] == UIGestureRecognizerStateBegan) { [self showBlurOverlay:YES]; - [gpu setBlurSize:0.0f]; + [gpu setBlurRadiusInPixels:0.0f]; if (isStatic) { [staticPicture processImage]; } } if ([sender state] == UIGestureRecognizerStateBegan || [sender state] == UIGestureRecognizerStateChanged) { - [gpu setBlurSize:0.0f]; + [gpu setBlurRadiusInPixels:0.0f]; [self.blurOverlayView setCircleCenter:tapPoint]; [gpu setExcludeCirclePoint:CGPointMake(tapPoint.x/320.0f, tapPoint.y/320.0f)]; } if([sender state] == UIGestureRecognizerStateEnded){ - [gpu setBlurSize:kStaticBlurSize]; + [gpu setBlurRadiusInPixels:kStaticBlurSize]; [self showBlurOverlay:NO]; if (isStatic) { [staticPicture processImage]; @@ -585,14 +585,14 @@ -(IBAction) handlePinch:(UIPinchGestureRecognizer *) sender { if ([sender state] == UIGestureRecognizerStateBegan) { [self showBlurOverlay:YES]; - [gpu setBlurSize:0.0f]; + [gpu setBlurRadiusInPixels:0.0f]; if (isStatic) { [staticPicture processImage]; } } if ([sender state] == UIGestureRecognizerStateBegan || [sender state] == UIGestureRecognizerStateChanged) { - [gpu setBlurSize:0.0f]; + [gpu setBlurRadiusInPixels:0.0f]; [gpu setExcludeCirclePoint:CGPointMake(midpoint.x/320.0f, midpoint.y/320.0f)]; self.blurOverlayView.circleCenter = CGPointMake(midpoint.x, midpoint.y); CGFloat radius = MAX(MIN(sender.scale*[gpu excludeCircleRadius], 0.6f), 0.15f); @@ -602,7 +602,7 @@ -(IBAction) handlePinch:(UIPinchGestureRecognizer *) sender { } if ([sender state] == UIGestureRecognizerStateEnded) { - [gpu setBlurSize:kStaticBlurSize]; + [gpu setBlurRadiusInPixels:kStaticBlurSize]; [self showBlurOverlay:NO]; if (isStatic) { [staticPicture processImage];