Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
[GPUImage] - Blend and Tone Curve filters GPUImageFilterGroup subclass
#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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment