Instance Method


Returns a semantic segmentation matte instance that wraps the replacement pixel buffer.


- (instancetype)semanticSegmentationMatteByReplacingSemanticSegmentationMatteWithPixelBuffer:(CVPixelBufferRef)pixelBuffer error:(NSError * _Nullable *)outError;



A pixel buffer containing a semantic segmentation matting image, represented as kCVPixelFormatType_OneComponent8 with a kCVImageBufferTransferFunction_Linear transfer function.


A populated NSError if the semantic segmentation matte couldn't be created.

Return Value

A new semantic segmentation matte instance, or nil if the pixel buffer is malformed.


When applying complex edits to media containing a semantic segmentation matte, you may create a derivative matte with arbitrary transforms applied to it. You can then use this method to create a new semantic segmentation matte instance.

See Also

Creating a Segmentation Matte

+ semanticSegmentationMatteFromImageSourceAuxiliaryDataType:dictionaryRepresentation:error:

Returns a new semantic segmentation matte instance from auxiliary image information in an image file.

- semanticSegmentationMatteByApplyingExifOrientation:

Returns a new semantic segmentation matte instance with the specified Exif orientation applied.

- dictionaryRepresentationForAuxiliaryDataType:

Returns a dictionary of primitive map information to use when writing an image file with a semantic segmentation matte.