Make an UIImage from a CMSampleBuffer
问题 This is not the same as the countless questions about converting a CMSampleBuffer to a UIImage . I'm simply wondering why I can't convert it like this: CVPixelBufferRef pixelBuffer = (CVPixelBufferRef)CMSampleBufferGetImageBuffer(sampleBuffer); CIImage * imageFromCoreImageLibrary = [CIImage imageWithCVPixelBuffer: pixelBuffer]; UIImage * imageForUI = [UIImage imageWithCIImage: imageFromCoreImageLibrary]; It seems a lot simpler because it works for YCbCr color spaces, as well as RGBA and