Skip to content

Instantly share code, notes, and snippets.

@rnaud
Created April 24, 2013 10:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rnaud/5451319 to your computer and use it in GitHub Desktop.
Save rnaud/5451319 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