未从MonoTouch中的CoreImage返回有效资产的有效图像 [英] A valid image not being returned from CoreImage in MonoTouch for a valid Asset

查看:74
本文介绍了未从MonoTouch中的CoreImage返回有效资产的有效图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此图像。

I am trying to get an image using this.

img = new UIImage(new MonoTouch.CoreImage.CIImage(validAssetObject),1.0f, UIImageOrientation.Up);

A CIImage 从<$返回c $ c> CIImage 调用。新的 UIImage 具有 CIImage 属性= null

A CIImage is returned from the CIImage call. The new UIImage has the CIImage property = null.

好像 UIImage 的构造函数无法按预期工作?

Seems like the constructor for UIImage is not working as expected?

任何来自MonoTouch社区的想法?

Any ideas from the MonoTouch community?

推荐答案

我写了一个快速测试,这似乎很好用。

I wrote a quick test and this seems to work fine.

string file = Path.Combine (NSBundle.MainBundle.ResourcePath, "image.png");
using (var url = NSUrl.FromFilename (file))
using (var ci = CIImage.FromUrl (url))
using (var ui = new UIImage (ci, 1.0f, UIImageOrientation.Up)) {
    Assert.IsNotNull (ui.CIImage, "CIImage");
}

其他方面必须有所不同,但您没有共享足够的源代码进行比较。您能否使用图片创建一个小的测试用例,并提交一个错误报告

Something else must differ but you have not shared enough source code to compare. Could you create a small test case, with your image, and file a bug report ?

这篇关于未从MonoTouch中的CoreImage返回有效资产的有效图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆