HDR image support for iOS 17 & Xcode 15.0 beta

I've followed the instructions in the WWDC23 presentation entitled "Support HDR images in your app" (wwdc2023-10181), but I am unable to see any HDR effect with my test photos. The Apple photos app shows the photos with the "HDR" tag and has the HDR effect.

Has anyone else been able to replicate what was done in the presentation in their app?

Is this truly supported by iOS 17 on an iPhone 13 pro with Xcode 15.0 beta? Or do we need to wait for the next beta release of iOS/Xcode? Or is there some missing information from the presentation?

Replies

Where are you getting your images from? If your pulling them from the camera roll, some of the APIs in seed 1 were not fully functional. If your getting your images from an asset catalog, they do not support HDR images in this release. As always, we are happy to accept a feedback request with everything needed to reproduce the issue as well.

Yes, the APIs do appear more more functional now.

I have some Apple Gain Map HDR photos on my camera roll that I took with the camera on iPhone 13 Pro with the iOS 17 beta installed. I also was able to get some of the Apple ISO HDR photos onto that phone from sample code for the WWDC23 session: https://developer.apple.com/documentation/uikit/images_and_pdf/supporting_hdr_images_in_your_app?language=objc

I am now able to see the HDR effect in my app using the xcode beta two build and iOS 17.0 (21A52688h).

Thanks.

One other issue I am seeing (and I have filed FB12470856) is that the PHAsset.mediaSubtypes value is not correct:

The HDR badge is not shown for either my gainmap HDR photos or for the ISO HDR photos.

In my code the PHAsset.mediaSubtypes value does not have the PHAssetMediaSubtypePhotoHDR bit set. Instead the undocumented 0x200 bit is the only bit that is set.

Seems to me that the 0x200 bit needs to be documented or the HDR bit (PHAssetMediaSubtypePhotoHDR = (1UL << 1)) needs to be set.

  • PHAssetMediaSubtypePhotoHDR is unrelated to gainmap photos. It is referring to the fact that a photo has been captured with higher dynamic range as an exposure bracket, and has been merged and tone-mapped back to LDR. It's the HDR before we had real HDR :)

Add a Comment