iPhone cameras can capture HDR photos, and when shown in the Photos app in OLDE iPhones, the HDR photo will be shown with different brightness for light and dark parts. The effect is shown in this tweet https://twitter.com/5tu/status/1327838250170368000 (although it is a video, the same applies to photos), the bright part of an HDR photo will show white brighter than the app's background white.

I cannot achieve this effect with UIImageView. How to achieve this effect for an HDR photo programmatically?

2

There are 2 best solutions below

0
On

although it is a video, the same applies to photos

What? Only AVIF and JPEG XL support HDR tranfer functions.

0
On

This is a same question: https://www.reddit.com/r/photography/comments/ni6603/iphone_photos_more_hdr_gets_brighter_than/

This app does what you looking for: https://apps.apple.com/us/app/radiance/id1573366225

this is documentation: https://developer.apple.com/videos/play/wwdc2022/10114/

you cannot do that with UIImageView, you need Metal.