我正在使用 BradLarson 的 GPUImage 库来过滤图像。我在我的项目中使用此代码。
GPUImagePicture *staticPicture;
过滤器的应用是这样的 -
-(void) setFilter:(int) index {
switch (index) {
case 1:{
filter = [[GPUImageContrastFilter alloc] init];
[(GPUImageContrastFilter *) filter setContrast:1.75];
} break;
case 2: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"crossprocess"];
} break;
case 3: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"02"];
} break;
case 4: {
filter = [[GrayscaleContrastFilter alloc] init];
} break;
case 5: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"17"];
} break;
case 6: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"aqua"];
} break;
case 7: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"yellow-red"];
} break;
case 8: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"06"];
} break;
case 9: {
filter = [[GPUImageToneCurveFilter alloc] initWithACV:@"purple-green"];
} break;
default:
filter = [[GPUImageFilter alloc] init];
break;
}
现在我想在不改变当前应用的滤镜的情况下增加 GPUImage 的亮度。如何做到这一点?