如何使用Core Image滤镜调整对比度或清晰度?

时间:2011-10-14 15:42:38

标签: iphone ios ios5 core-image

1 个答案:

答案 0 :(得分:12)

对比很简单:

CIFilter * controlsFilter = [CIFilter filterWithName:@"CIColorControls"];
[controlsFilter setValue:myImage forKey:kCIInputImageKey];
[controlsFilter setValue:@(1.5) forKey:@"inputContrast"];//and so on
displayImage = controlsFilter.outputImage; //and do a conversion from CIImage

然而,为了清晰度,你运气不好,因为它不包含在iOS 5.0的过滤器中。