区别
CGImgeRef 图像里面的数据, CIImage和UIimage进行曲转换
初始化方法
//返回一个空的CIImage对象
+ (CIImage *)emptyImage;
//创建并返回一个无限范围的图像,其整个内容都是指定的颜色
//用对象所代表的颜色初始化的图像对象。
+ (CIImage *)imageWithColor:(CIColor *)color;
- (instancetype)initWithColor:(CIColor *)color;
//用 Quartz 2D图像初始化图像对象。
+ (CIImage *)imageWithCGImage:(CGImageRef)image;
- (instancetype)initWithCGImage:(CGImageRef)image;
+ (CIImage *)imageWithCGImage:(CGImageRef)image options:(NSDictionary<CIImageOption, id> *)options;
- (instancetype)initWithCGImage:(CGImageRef)image options:(NSDictionary<CIImageOption, id> *)options;
//通过从 URL 读取图像来初始化图像对象。
//通过文件位置初始化一个图像对象---url为文件位置
+ (CIImage *)imageWithContentsOfURL:(NSURL *)url;
- (instancetype)initWithContentsOfURL:(NSURL *)url;
+ (CIImage *)imageWithContentsOfURL:(NSURL *)url options:(NSDictionary<CIImageOption, id> *)options;
- (instancetype)initWithContentsOfURL:(NSURL *)url options:(NSDictionary<CIImageOption, id> *)options;
//通过NSData初始化对象
+ (CIImage *)imageWithData:(NSData *)data;
- (instancetype)initWithData:(NSData *)data;
+ (CIImage *)imageWithData:(NSData *)data options:(NSDictionary<CIImageOption, id> *)options;
- (instancetype)initWithData:(NSData *)data options:(NSDictionary<CIImageOption, id> *)options;