【问题标题】:Applying CIFiler to a masked portion of an image将 CIFiler 应用于图像的蒙版部分
【发布时间】:2012-12-09 14:25:38
【问题描述】:

我正在寻找一种将 CIFilter 应用于蒙版定义的图像部分的方法。像这样,给定一张图片:

Source http://imageshack.us/scaled/landing/213/browserpreviewtmp1p.jpg

还有一个面具:

我应用了一些变体

CIFilter *filter = [CIFilter filterWithName:@"CIColorControls" keysAndValues: kCIInputImageKey, beginImage,@"inputSaturation", @0, @"inputContrast", @1, @"inputBrightness", @0, nil];

得到这个:

Result http://imageshack.us/a/img689/5297/browserpreviewtmpd.jpg

我该怎么做?

【问题讨论】:

    标签: ios image-processing core-image cifilter


    【解决方案1】:

    您可以使用另一对 CIFilters!您可以使用CIMultiplyBlendMode 将顶部图像与蒙版相乘,然后使用CIAdditionCompositing 将其添加到底部图像。

    【讨论】:

      猜你喜欢
      • 2012-05-15
      • 1970-01-01
      • 1970-01-01
      • 2018-07-29
      • 2015-07-07
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      相关资源
      最近更新 更多