Created
April 24, 2013 10:55
-
-
Save rnaud/5451319 to your computer and use it in GitHub Desktop.
[GPUImage] - Blend and Tone Curve filters GPUImageFilterGroup subclass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "GPUImageBlendTone.h" | |
#import "GPUImage.h" | |
@implementation GPUImageBlendTone | |
- (id)init; | |
{ | |
if (!(self = [super init])) | |
{ | |
return nil; | |
} | |
UIImage *inputImage14 = [UIImage imageNamed:@"blackboard1024.png"]; | |
GPUImagePicture* sourcePicture = [[GPUImagePicture alloc] initWithImage:inputImage14 smoothlyScaleOutput:YES]; | |
GPUImageOverlayBlendFilter * overlay14 = [[GPUImageOverlayBlendFilter alloc] init]; | |
[self addFilter:overlay14]; | |
[sourcePicture addTarget:overlay14 atTextureLocation:1]; | |
[sourcePicture processImage]; | |
GPUImageToneCurveFilter * toneFilter = [[GPUImageToneCurveFilter alloc] initWithACV:@"cross_1"]; | |
[self addFilter:toneFilter]; | |
[overlay14 addTarget:toneFilter]; | |
[self setInitialFilters:[NSArray arrayWithObject:overlay14]]; | |
[self setTerminalFilter:toneFilter]; | |
return self; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment