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


convenience init(fromImageSourceAuxiliaryDataType imageSourceAuxiliaryDataType: CFString, dictionaryRepresentation imageSourceAuxiliaryDataInfoDictionary: [AnyHashable : Any]) throws



The kCGImageAuxiliaryDataType constants corresponding to the semantic segmentation matte being created (see CGImageProperties).


A dictionary of primitive semantic segmentation matte information obtained from CGImageSourceCopyAuxiliaryDataInfoAtIndex(_:_:_:).


On return, if the semantic segmentation matte cannot be created, points to an NSError describing the problem.

Return Value

A new semantic segmentation matte instance, or nil if the auxiliary data info dictionary is malformed.

See Also

Creating a Segmentation Matte

func replacingSemanticSegmentationMatte(with: CVPixelBuffer) -> Self

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

func applyingExifOrientation(CGImagePropertyOrientation) -> Self

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

func dictionaryRepresentation(forAuxiliaryDataType: AutoreleasingUnsafeMutablePointer<NSString?>?) -> [AnyHashable : Any]?

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