CIContext
extension CIContext
-
Creates a UIImage from the given sample buffer input
Declaration
Swift
public func uiimage(withSampleBuffer sampleBuffer: CMSampleBuffer) -> UIImage?Parameters
sampleBuffersample buffer input
Return Value
UIImage from the sample buffer, otherwise nil
-
Creates a UIImage from the given pixel buffer input
Declaration
Swift
public func uiimage(withPixelBuffer pixelBuffer: CVPixelBuffer) -> UIImage?Parameters
pixelBufferPixel buffer input
Return Value
UIImage from the pixel buffer, otherwise nil
-
Orient a pixel buffer using an exif orientation value.
Declaration
Swift
@available(iOS 11.0, *) public func createPixelBuffer(fromPixelBuffer pixelBuffer: CVPixelBuffer, withOrientation orientation: CGImagePropertyOrientation, pixelBufferPool: CVPixelBufferPool) -> CVPixelBuffer?Parameters
pixelBufferPixel buffer input
orientationCGImage orientation for the new pixel buffer
pixelBufferPoolPixel buffer pool at which to allocate the new buffer
Return Value
Oriented pixel buffer, otherwise nil
CIContext Extension Reference