Saving kCGImagePropertyExifAuxDictionary

I can't seem to save the Focus Regions to a jpg when capturing a photo.


I am able to save a photo with depth data, but not the focus region. After capturing a photo, the focus region is in AVCapturePhotoOutput metadata as expected.

Focus Regions are stored in the "ExifAux" key (kCGImagePropertyExifAuxDictionary).


It appears that this key kCGImagePropertyExifAuxDictionary is stripped out during the jpg save.


I'm following the Session 508 2017 to save a depth photo. Here is the call that adds the metadata to the destination.


CGImageDestinationAddImage(cgImageDestination, renderedCGImage, attachments)


When I open this saved photo, it has all of the metadata except the kCGImagePropertyExifAuxDictionary key.


Is there a special way to save ExifAux data to a photo file?


Using XCode 9 beta 6 and iOS11 beta 8.


Thanks!

James

Saving kCGImagePropertyExifAuxDictionary
 
 
Q