Instance Method

semanticSegmentationMatteByReplacingSemanticSegmentationMatteWithPixelBuffer:error:

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

Declaration

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

Parameters

pixelBuffer

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

outError

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.

Discussion

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.