I started with this code :session 507 WWDC 2017
and I use this tutorial : ray tutorial
In iOS camera Roll I can activate “Portrait effect” during the editing of the image taken from my app.
Now I want to know how can I save directly the picture with this effect already activated?
I think my code is right because I can save the depth metadata.
I activate the bool in session configuration
self.photoOutput.depthDataDeliveryEnabled = YES;
and in capture output session I update the settings:
photoSettings.depthDataDeliveryEnabled = self.photoOutput.isDepthDataDeliveryEnabled;
and this is in my delegate :
-
(void)captureOutput:(AVCapturePhotoOutput *)captureOutput didFinishProcessingPhoto:(AVCapturePhoto *)photo error:(nullable NSError *)error
{
if ( error != nil ) {
NSLog( @“Error capturing photo: %@”, error );
return;
}self.photoData = [photo fileDataRepresentation];
}
but I do not understand why in system camera roll I don’t have the " portrait badge", but It only appears during the editing :
So how can I save my photo with the portrait effect activated?
Thanks a lot