How to convert CVPixelBufferRef from kCVPixelFormatType_32ARGB to kCVPixelFormatType_24RGB

I am a new Apple developer and I am struggling with various representations of images ...

I will have a CVPixelBufferRef in the format kCVPixelFormatType_32ARGB, and I would like to create a new kCVPixelFormatType_24RGB CVPixelBufferRef from it (i.e. discarding alpha bits).

Is there an easy way to do this, or do I need to copy it using the 'for' loop?

I am using Mac OSX 10.6.4 and working on this sample code.

Thanks Pinhassi.

+3
source share
1 answer

Accelerate vImageConvert_ARGB8888toRGB888(), SIMD.

0

Source: https://habr.com/ru/post/1769501/


All Articles