Contents

replacementSemanticSegmentationMatte(ofType:for:)

Replaces or removes the semantic segmentation matte of the specified type from the flattened file data representation.

Declaration

optional func replacementSemanticSegmentationMatte(ofType semanticSegmentationMatteType: AVSemanticSegmentationMatte.MatteType, for photo: AVCapturePhoto) -> AVSemanticSegmentationMatte?

Parameters

  • semanticSegmentationMatteType:

    The type of semantic segmentation matte to be replaced or stripped.

  • photo:

    The calling instance of Avcapturephoto.

Return Value

An instance of AVSemanticSegmentationMatte. To preserve the existing matte, return photo.```AVCapturePhoto/semanticSegmentationMatte(for:)``. To strip the existing one, return nil`. To replace, provide a replacement AVSemanticSegmentationMatte instance.

Discussion

This callback is optional. If your delegate doesn’t implement this callback, the existing semantic segmentation matte of the specified type in the in-memory AVCapturePhoto container is written to the file data representation.

See Also

Replacing or removing metadata