无法获得过滤器“CICMYKHalftone”

时间:2014-01-27 13:36:06

标签: filter

我只是想修复过滤器“CICMYKHalftone”,但“* cMYKHalftone”没有得到过滤器......

 CIImage *inputImage = [[CIImage alloc] initWithImage: [UIImage      imageNamed:@"images.jpeg"]];
CIFilter *cMYKHalftone = [CIFilter filterWithName:@"CICMYKHalftone"];
[cMYKHalftone setDefaults]; 
[cMYKHalftone setValue:inputImage forKey:kCIInputImageKey];
[cMYKHalftone setValue:[CIVector vectorWithX:150 Y:150] forKey:@"inputCenter"];
[cMYKHalftone setValue:[NSNumber numberWithFloat:6.00] forKey:@"inputWidth"];
[cMYKHalftone setValue:[NSNumber numberWithFloat:0.00] forKey:@"inputAngle"];
[cMYKHalftone setValue:[NSNumber numberWithFloat:0.70] forKey:@"inputSharpness"];
[cMYKHalftone setValue:[NSNumber numberWithFloat:1.00] forKey:@"inputGCR"];
[cMYKHalftone setValue:[NSNumber numberWithFloat:0.50] forKey:@"inputUCR"];
CIImage *outputImage = [cMYKHalftone valueForKey:@"outputImage"];
CIContext *context = [CIContext contextWithOptions:nil];
theImageview.image = [UIImage imageWithCGImage:[context createCGImage:outputImage fromRect:outputImage.extent]];

1 个答案:

答案 0 :(得分:0)

此过滤器不适用于iOS。