Photos Extensions: Provide a read-only mechanism for data in the original image file

Originator:craig.hockenberry
Number:rdar://20026572 Date Originated:
Status:Open Resolved:
Product:iOS SDK Product Version:8.1.3
Classification:Enhancement Reproducible:Always
 
Summary:
A PHContentEditingInput instance currently only provides a fullSizeImageURL property. This property points to either the original image or the most recent edit. For manipulating image data, this is perfect.

The problem is that any metadata that may be attached to the original image can easily be lost by editing the file. A developer must take extra steps using CGImageSourceCopyPropertiesAtIndex and CGImageDestinationAddImage to preserve the metadata.

Apple’s own photo filters and sample code discard the metadata attached to the image. So do many third-party Photos Extensions. If you get a “FullSizeRender.jpg”, chances are very good that there is no Exif exposure information or GPS coordinates in the file.

Automatically copying the metadata between the original image and the rendered image is not appropriate: an extension may want to modify the properties (for example, adding a value for the kCGImagePropertyTIFFSoftware or kCGImagePropertyTIFFCopyright keys).

I believe the best approach is give the Photos Extension read-only access to the original image file so it can read the metadata as appropriate. For example, if the fullSizeImageURL is file:///var/mobile/Media/PhotoData/Mutations/DCIM/101APPLE/IMG_1759/Adjustments/FullSizeRender.jpg, the extension also gets a originalImageURL at file:///var/mobile/Media/DCIM/101APPLE/IMG_1759.JPG. By making the access read-only, the integrity of the media file system can be maintained.

Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
N/A

Version:
8.1.3

Notes:


Configuration:
iPhone 5

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!