Skip to content

Instantly share code, notes, and snippets.

@depthlove
Forked from rnaud/gist:5451319
Created October 11, 2017 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save depthlove/0c67fdc94e3fc947cd05b2ae862daed9 to your computer and use it in GitHub Desktop.
Save depthlove/0c67fdc94e3fc947cd05b2ae862daed9 to your computer and use it in GitHub Desktop.
[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;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment