当应用CIFilter时发生错误iOS

时间:2015-08-13 17:56:00

标签: ios core-image cifilter ciimage

使用CoreImage(Framework)并应用CIFilter时 发生了很多错误

ERROR - could not find uniform for argument 12
ERROR - could not find uniform for argument 14
ERROR - could not find uniform for argument 16
ERROR - could not find uniform for argument 14
ERROR - could not find uniform for argument 16

这些错误发生在CIContext这一行:

[Context drawImage:background atPoint:CGPointZero fromRect:[image extent]];

- >在一个图像上应用过滤器时不会出现此错误

    image = [CIFilter filterWithName:@"kCICategoryNonSquarePixels" keysAndValues:kCIInputImageKey, image, @"inputColor0", [CIColor colorWithRed:0.0 green:0.2 blue:0.0], @"inputColor1", [CIColor colorWithRed:0.0 green:0.0 blue:1.0], nil].outputImage;

- >在两个图像上应用过滤器时会出现此错误

CIImage *image = [CIImage imageWithCVPixelBuffer:pixelBuffer];



CIFilter *filter = [CIFilter filterWithName:@"CIMinimumCompositing"];

[filter setValue:background forKey:kCIInputBackgroundImageKey];
[filter setValue:image forKey:kCIInputImageKey];

background = [filter outputImage];
[coreImageContext drawImage:background atPoint:CGPointZero fromRect:[background extent]];

    [self.context presentRenderbuffer:GL_RENDERBUFFER];

任何帮助请?

0 个答案:

没有答案