core-image – 核心图像过滤器“CIDepthBlurEffect”无法在iOS 11Xcode 9.0上运行

core-image – 核心图像过滤器“CIDepthBlurEffect”无法在iOS 11Xcode 9.0上运行,第1张

概述我无法使新的CIDepthBlurEffect工作.我做错了什么,或者这是一个已知的问题? 以下是Objective-C中的代码: NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithBool:YES], [NSNumber numberWith 我无法使新的CIDepthBlurEffect工作.我做错了什么,或者这是一个已知的问题?

以下是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上运行所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1001436.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存