replacementPortraitEffectsMatte(for:)
A callback in which you can provide a replacement portrait effects matte, or strip the existing portrait effects matte from the file.
Declaration
optional func replacementPortraitEffectsMatte(for photo: AVCapturePhoto) -> AVPortraitEffectsMatte?Parameters
- photo:
The calling instance of Avcapturephoto whose file metadata you’re modifying.
Return Value
An instance of AVPortraitEffectsMatte. To preserve the existing portrait effects matte, return photo.portraitEffectsMatte. To strip the existing portrait effects matte, return nil. To replace the portrait effects matte, provide a replacement AVPortraitEffectsMatte instance.
Discussion
This callback is optional. If your delegate doesn’t implement this callback, the existing metadata in the in-memory AVCapturePhoto container is written directly to the file data representation.