I customize the captured portrait mode photo's depthData by using fileDataRepresentationWithCustomizer method, and replace the depth data with my edited version.
- (nullable AVDepthData *)replacementDepthDataForPhoto:(AVCapturePhoto *)photo{
return myEditedDepthData;
}
The weird thing is that the returned NSData value of fileDataRepresentationWithCustomizer losts portraitMatte.
CGImageSourceRef imageSource = CGImageSourceCreateWithData((CFDataRef)nsData, NULL);
CFDictionaryRef dicRef = CGImageSourceCopyAuxiliaryDataInfoAtIndex(imageSource, 0, kCGImageAuxiliaryDataTypePortraitEffectsMatte);
the dicRef always return 0x0 after I use fileDataRepresentationWithCustomizer instead of fileDataRepresentation
Does anyone know what am I doing wrong?