Support HDR images in your app

RSS for tag

Discuss the WWDC23 Session Support HDR images in your app

Posts under wwdc2023-10181 tag

6 Posts

Post

Replies

Boosts

Views

Activity

Display HDR images for PhotoKit assets
In my app I get a UIImage for a PHAsset via PHImageManager.requestImage(for:targetSize:contentMode:options:resultHandler:). I directly display that image in a UIImageView that has preferredImageDynamicRange set to .high. The problem is I do not see the high dynamic range. I see the HDRDemo23 sample code uses PhotosPicker to get a UIImage from Data through UIImageReader whose config enables prefersHighDynamicRange. Is there a way to support HDR when using the Photos APIs to request display images? And is there support for PHLivePhoto displayed in PHLivePhotoView retrieved via PHImageManager.requestLivePhoto?
4
1
1.9k
Apr ’24
UIImageView preferredImageDynamicRange not working
I am trying to display HDR Images (ProRAW) within UIImageView using preferredImageDynamicRange. This was shown in a 2023 WWDC Video let imageView = UIImageView() if #available(iOS 17.0, *) { self.imageView.preferredImageDynamicRange = UIImage.DynamicRange.high } self.imageView.clipsToBounds = true self.imageView.isMultipleTouchEnabled = true self.imageView.contentMode = .scaleAspectFit self.photoScrollView.addSubview(self.imageView) I pull the image from PHImageManager: let options = PHImageRequestOptions() options.deliveryMode = .highQualityFormat options.isNetworkAccessAllowed = true PHImageManager.default().requestImage(for: asset, targetSize: self.targetSize(), contentMode: .aspectFit, options: options, resultHandler: { image, info in guard let image = image else { return } DispatchQueue.main.async { self.imageView.image =image if #available(iOS 17.0, *) { self.imageView.preferredImageDynamicRange = UIImage.DynamicRange.high } } } Issue The image shows successfully, yet not in HDR mode (no bright specular highlights, as seen when the same image ((ProRAW) is pulled on the native camera app. What am I missing here?
1
0
1.2k
Sep ’23
HDR Image capture/conversion
Hello! After recent talk on the WWDC2023 about HDR support and finding this documentation page on Applying Apple HDR effect on photos, I became very interested in the HDR Gain Map format. From documentation page it is clear how we can restore original HDR from SDR and Gain Map representation, but my question is - how from HDR we can convert back to the SDR + Gain Map representation? As I understand right know, conversion from HDR to SDR + Gain Map includes two steps: Tone mapping of HDR for getting correct SDR When we have both HDR and SDR, from equation in the documentation page we can calculate Gain Map Am I correct? If so, what tone mapping algorithm for HDR -> SDR conversion is used right know? Can't find any information about this in the internet:( Would be very grateful for your response!
3
2
2.6k
Sep ’23
iOS17 beta : AVAssetImageGenerator HDR CGImage generation from HDR AVAsset ?
Hi, With iOS17 adding APIs to display and handle HDR images in apps, is the AVAssetImageGenerator supposed to generate CGImages with an HDR color profile (when the AVAsset is an HDR video)? I cannot get it to work, in the simulator or on the device : the colorspace of the CGImage seems to always be kCGColorSpaceModelRGB, no matter how I configure the AVAssetImageGenerator. So the created UIImage is not displayed as an HDR image in a UIImageView (with preferredImageDynamicRange set to UIImageDynamicRangeHigh) Is there another known way to generate an image at a specific time of an AVAsset?
0
1
1.1k
Aug ’23
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?
3
0
1.8k
Jul ’23
Display HDR images for PhotoKit assets
In my app I get a UIImage for a PHAsset via PHImageManager.requestImage(for:targetSize:contentMode:options:resultHandler:). I directly display that image in a UIImageView that has preferredImageDynamicRange set to .high. The problem is I do not see the high dynamic range. I see the HDRDemo23 sample code uses PhotosPicker to get a UIImage from Data through UIImageReader whose config enables prefersHighDynamicRange. Is there a way to support HDR when using the Photos APIs to request display images? And is there support for PHLivePhoto displayed in PHLivePhotoView retrieved via PHImageManager.requestLivePhoto?
Replies
4
Boosts
1
Views
1.9k
Activity
Apr ’24
UIImageView preferredImageDynamicRange not working
I am trying to display HDR Images (ProRAW) within UIImageView using preferredImageDynamicRange. This was shown in a 2023 WWDC Video let imageView = UIImageView() if #available(iOS 17.0, *) { self.imageView.preferredImageDynamicRange = UIImage.DynamicRange.high } self.imageView.clipsToBounds = true self.imageView.isMultipleTouchEnabled = true self.imageView.contentMode = .scaleAspectFit self.photoScrollView.addSubview(self.imageView) I pull the image from PHImageManager: let options = PHImageRequestOptions() options.deliveryMode = .highQualityFormat options.isNetworkAccessAllowed = true PHImageManager.default().requestImage(for: asset, targetSize: self.targetSize(), contentMode: .aspectFit, options: options, resultHandler: { image, info in guard let image = image else { return } DispatchQueue.main.async { self.imageView.image =image if #available(iOS 17.0, *) { self.imageView.preferredImageDynamicRange = UIImage.DynamicRange.high } } } Issue The image shows successfully, yet not in HDR mode (no bright specular highlights, as seen when the same image ((ProRAW) is pulled on the native camera app. What am I missing here?
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’23
HDR Image capture/conversion
Hello! After recent talk on the WWDC2023 about HDR support and finding this documentation page on Applying Apple HDR effect on photos, I became very interested in the HDR Gain Map format. From documentation page it is clear how we can restore original HDR from SDR and Gain Map representation, but my question is - how from HDR we can convert back to the SDR + Gain Map representation? As I understand right know, conversion from HDR to SDR + Gain Map includes two steps: Tone mapping of HDR for getting correct SDR When we have both HDR and SDR, from equation in the documentation page we can calculate Gain Map Am I correct? If so, what tone mapping algorithm for HDR -> SDR conversion is used right know? Can't find any information about this in the internet:( Would be very grateful for your response!
Replies
3
Boosts
2
Views
2.6k
Activity
Sep ’23
iOS17 beta : AVAssetImageGenerator HDR CGImage generation from HDR AVAsset ?
Hi, With iOS17 adding APIs to display and handle HDR images in apps, is the AVAssetImageGenerator supposed to generate CGImages with an HDR color profile (when the AVAsset is an HDR video)? I cannot get it to work, in the simulator or on the device : the colorspace of the CGImage seems to always be kCGColorSpaceModelRGB, no matter how I configure the AVAssetImageGenerator. So the created UIImage is not displayed as an HDR image in a UIImageView (with preferredImageDynamicRange set to UIImageDynamicRangeHigh) Is there another known way to generate an image at a specific time of an AVAsset?
Replies
0
Boosts
1
Views
1.1k
Activity
Aug ’23
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
3
Boosts
0
Views
1.8k
Activity
Jul ’23
HLG or PQ transfer type for 10 bit heif
I understand that Apple fully implemented the ITU-R BT.2100 PQ and HLG transfer types for various image formats. I’m working on a project where I have a dng file as an input and I need to save the modified file as heif. Which transfer method should I choose? Does it matter?
Replies
1
Boosts
0
Views
1.7k
Activity
Jun ’23