How can I write a YUV frame data into a CGContext?
A:
Convert it to RGB, then create a CGImage with it, then draw that into the context.
Alternatively, create a CGColorSpace that maps YUV into RGB, then create a CGImage with it, then draw that into the context. (I have no idea whether this is possible, but you may want to look into it.)
Peter Hosey
2009-10-14 03:30:04
I know how to convert YUV to RGB, how do you convert RGB to CGImage?
ReachConnection
2009-10-14 15:02:13
That's not a conversion. You create a CGImage object with the RGB data, using `CGImageCreate`: http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CGImage/Reference/reference.html#//apple_ref/c/func/CGImageCreate
Peter Hosey
2009-10-14 19:37:18