开发者

How can you use Core Image filters to adjust contrast or sharpness?

开发者 https://www.devze.com 2023-04-12 21:27 出处:网络
How do you adjust contrast or sharpness using the Core Image framework?Which filters should be used an开发者_Go百科d why?

How do you adjust contrast or sharpness using the Core Image framework? Which filters should be used an开发者_Go百科d why?

Are there any examples which show how to do this?


Contrast is easy:

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

However, for sharpness, you're out of luck, as that's not included in the filters for iOS 5.0.

0

精彩评论

暂无评论...
验证码 换一张
取 消