VTCreateCGImageFromCVPixelBuffer

Function VTCreateCGImageFromCVPixelBuffer 

Source
pub unsafe extern "C-unwind" fn VTCreateCGImageFromCVPixelBuffer(
    pixel_buffer: &CVPixelBuffer,
    options: Option<&CFDictionary>,
    image_out: NonNull<*mut CGImage>,
) -> i32
Available on crate features VTUtilities and objc2-core-graphics and objc2-core-video only.
Expand description

Creates a CGImage using the provided CVPixelBuffer

Parameter pixelBuffer: The pixelBuffer to be used as the image data source for the CGImage.

Parameter options: no options currently. pass NULL.

Parameter imageOut: pointer to an address to receive the newly created CGImage.

This routine creates a CGImage representation of the image data contained in the provided CVPixelBuffer. The source CVPixelBuffer may be retained for the lifetime of the CGImage. Changes to the CVPixelBuffer after making this call (other than releasing it) will have undefined results. Not all CVPixelBuffer pixel formats will support conversion into a CGImage compatible pixel format.

ยงSafety

  • options generics must be of the correct type.
  • image_out must be a valid pointer.