【问题标题】:Why properties method of CIImage returns nil为什么 CIImage 的 properties 方法返回 nil
【发布时间】:2014-04-04 12:21:49
【问题描述】:

我正在使用 coreImage 框架开发一个应用程序。我从 UIImage 创建了一个 CIImage。

CIImage *image = [CIImage imageWithCGImage:self.canvasImage.CGImage];

这里 self.canvasImage 是一个 UIImage,我调试它并且对象图像正在由编译器创建并带有一些内存。

我正在使用以下代码创建由 properties 方法返回的 NSDictionary 对象。

NSDictionary *opts  =[image properties] ;

这里我的 opts 对象被分配了 nil 值

我搜索了,但没有找到解决方案,为什么 properties 方法返回 nil 值?

【问题讨论】:

标签: ios iphone core-image ciimage


【解决方案1】:

我遇到了同样的问题。如果您使用 imageWithData: 或 imageWithContentsOfURL: 创建 CIImage,则属性字典只有非 nil。

它根本没有很好的记录。查看 WWDC 2013 会议 509。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-02-25
    • 1970-01-01
    • 2015-11-08
    • 2014-11-11
    • 2021-12-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多