I have uiImage which is backed by a CIImage and its ciImage property is not nil. However if I create a new ciImage from this uiImage, it seems it is nil. Yes I know that I can directly use uiImage.ciImage property but I just wonder why this one fails. Any help please? I also need good references explaining all this apple image formats internals and details, good documents or links are welcome! Edit : This question is not a dublicate of since it is pointing a problem in UIImage to CIImge conversion, not reverse.
if uiImage.ciImage == nil {
fatalError() // this one passes
}
let ciNew = CIImage(image: uiImage)
if ciNew == nil {
fatalError() // this gives fatal error !?
}