MediaSubtype.photoDepthEffect should be changed to .photoWithDepth

Originator:tobiasdm
Number:rdar://33037252 Date Originated:6/28/2017
Status:Open Resolved:No
Product:iOS Product Version:iOS 11
Classification: Reproducible:Yes
 
Area:
Photos Framework

Summary:
When requesting for images with depth data, the only option is to ask for photos "captured with the Camera app's Portrait mode depth effect". It would be quite useful to be able to ask for any photo that has depth data, since third party apps that take photos along with depth data and store it to the Photo Library doesn't get tagged with the MediaSubtype.photoDepthEffect.

Steps to Reproduce:
Create a PHFetchOptions() and add a predicate for fetching photos with depth using the following code:

let options = PHFetchOptions()
options.predicate = NSPredicate(format: "((mediaSubtype & %d) != 0)", PHAssetMediaSubtype.photoDepthEffect.rawValue)

Expected Results:
Use the code with a .photoWithDepthData media subtype:

let options = PHFetchOptions()
options.predicate = NSPredicate(format: "((mediaSubtype & %d) != 0)", PHAssetMediaSubtype.photoWithDepthData.rawValue)

Get all photos from Photo Library that has depth data.

Observed Results:
This fail to get all photos that has depth data. It only gets the photos that has a depth effect applied to it from the built in iOS Camera.app.

Duplicates

Number Status Originator Product Title
rdar://33532735 Duplicate/33037252 harshilshah1910 Photos Framework PHAssetMediaSubtype should have an option for depth data

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!