Permalink
Browse files

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:
#45.
  • Loading branch information...
1 parent 098806d commit 08ad0e196a4dea5b252b24e7175ddb0ac2ed2f46 @nebiros nebiros committed Dec 19, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 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];

0 comments on commit 08ad0e1

Please sign in to comment.