以下是Objective-C中的代码:
NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithBool:YES],[NSNumber numberWithBool:YES],nil] forKeys:[NSArray arrayWithObjects:kCIImageAuxiliarydisparity,@"kCIImageApplyOrIEntationProperty",nil]];CIImage *disparityImage = [CIImage imageWithData:imageData options:dict];CIFilter *cIDepthBlurEffect = [CIFilter filterWithname:@"CIDepthBlurEffect"];[cIDepthBlurEffect setDefaults];[cIDepthBlurEffect setValue:disparityImage forKey:@"inputdisparityImage"];[cIDepthBlurEffect setValue:originalimage forKey:@"inputimage"];CIImage *outputimage = [cIDepthBlurEffect valueForKey:@"outputimage"];EAGLContext *prevIEwEaglContext = [[EAGLContext alloc] initWithAPI:kEAglrenderingAPIOpenGLES2];CIContext *context = [CIContext contextWithEAGLContext:prevIEwEaglContext options:@{kCIContextWorkingFormat :[NSNumber numberWithInt:kCIFormatRGBAh]} ];CGImageRef cgimg = [context createCGImage:disparityImage fromrect:[disparityImage extent]];image = [[UIImage alloc] initWithCGImage:cgimg];CGImageRelease(cgimg);解决方法 Xcode 9 beta 2和iOS 11 beta 2的发布解决了这个问题. 总结
以上是内存溢出为你收集整理的core-image – 核心图像过滤器“CIDepthBlurEffect”无法在iOS 11 / Xcode 9.0上运行全部内容,希望文章能够帮你解决core-image – 核心图像过滤器“CIDepthBlurEffect”无法在iOS 11 / Xcode 9.0上运行所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)