我发现在IOS中,UIImage可以转换为CIImage。而且UIImage有一个名为CIImage的属性。当我使用UIImage时,UIImage对象不为空,但UIImage.ciimage
是空的,为什么?
如果有人能帮助我解答这个问题,非常感谢!请原谅我的愚蠢。
例如,像下面的代码会返回null:
UIImage *image = [UIImage imageNamed:@"test.jpg"];
CIImage *ciImage = image.CIImage
但如果这样,CIImage 不为空:
UIImage *image = [UIImage imageNamed:@"test.jpg"];
CIImage *myImage = [[CIImage alloc] initWithCGImage:image.CGImage options:nil];
initWithImage:
初始化器。 - matt