Convert UIImage to CVPixelBufferRef

后端 未结 5 1577
挽巷
挽巷 2020-12-31 08:56

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 someo

5条回答
  •  爱一瞬间的悲伤
    2020-12-31 09:28

    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.

提交回复
热议问题