views:

47

answers:

1

Hi @ll

I want to convert a UIImage object to a CVPixelBufferRef object, but I have absolutly no idea. And I can't find any example code doing anything like this.

Can someone please help me? THX in advance!

C YA

A: 

A CVPixelBufferRef is what core video uses for camera input.

You can create similar pixel bitmaps from images using CGBitmapContextCreate and then drawing the image into the bitmap context.

hotpaw2
What I want to do is to add single frames to a movie using the AV Foundation. This will be done using the class AVAssetWriterInputPixelBufferAdaptor. But this class expects CVPixelBufferRef objects. So, how can I convert a UIImage to a CVPixelBufferRef object?
Nuker