[Enhancement] Add ultra HDR support
Is your feature request related to a problem? Please describe. Most modern phones (such as pixel phones) add extra data to photos to control the brightness of the screen in each pixel of the image, this is called Ultra HDR. If you take a photo on the default camera app, it will look brighter on other apps such as Google Photos compared to Gallery.
Describe the solution you'd like Implement gain map detection and display for photos, it is explained here
Additional context Not really possible to screenshot since it just controls screen brightness, some ultra HDR examples are on this page
Note that ultra HDR is only supported starting from android 14
On the topic, ISO 21496-1 should be supported as well. Android 15 and iOS 18 have both adopted it for cross platform HDR jpegs. On Android the Adobe derived standard currently powering ultra HDR will live on for a while side by side with ISO 21496-1 method.
https://www.androidauthority.com/google-apple-hdr-photo-standard-3495035/
Greetings. I installed 3.0.1-30131 Release version and there's something wrong with HDR photos. The screen brightness is increased only once for each photo. Then these photos will always look like regular SDR photos. Pixel 8 Pro, Android 15.
Greetings. I installed 3.0.1-30131 Release version and there's something wrong with HDR photos. The screen brightness is increased only once for each photo. Then these photos will always look like regular SDR photos. Pixel 8 Pro, Android 15.
I don't have a HDR compatible device so can you explain a bit better when the photos are brightening correctly, when they aren't, when they should be
Yeah sure.
So when I open the gallery I see a bunch of photos. No HDR brightness there and probably shouldn't be, at least this behavior is the same as in Google Photos, I see regular SDR miniatures.
Then I click at one of these miniatures to open some HDR photo. What I expect here and what should always happen is the photo will open up in HDR mode with fancy colors and high brightness. However for some reason it works only one time for one photo. After I close the app and then open the same HDR photo as before, it will look like a regular SDR photo without proper colors and high brightness. This photo is cursed now and I won't see HDRness at this photo in your app. Sometimes I don't even need to close the app to downgrade the photo and swiping between different photos is enough. Swiping though doesn't always work and I couldn't find any pattern. Closing the app will break the photo 100% of time.
Photo itself didn't change as I can see it without issues in Google Photos.
Hope this helps.
Ok great, I'll release tomorrow a fix for it, thanks
Hello again, I saw you closed the issue.
I downloaded latest nightly and this problem still there. Then I tried apk from https://github.com/IacobIonut01/Gallery/actions/runs/11768163534 just in case and result was the same.
Is the issue actually the same? I can't really test it, just with logging I can see that when a bitmap has gainmap the color space is set and removed when the next page is in place and the image does not not have gainmap
Well I don't know what bitmap and gainmap is but yeah the issue is the same. Once one photo is viewed it becomes "cursed" and no high brightness and saturated colors will be there for this photo.
Well I don't know what bitmap and gainmap is but yeah the issue is the same. Once one photo is viewed it becomes "cursed" and no high brightness and saturated colors will be there for this photo.
I'll try to find someway to test it properly; gainmap is the HDR light map applied over normal photos that the display can show to properly view the photos
Great, let me know if I can help you somehow
I'm using a Pixel 7 Pro and can confirm that the Ultra HDR mode works, but it's very unreliable. Sometimes it will show for an image, sometimes it won't.
I volunteer for testing as I have the required hardware available and I'm very interested in this feature.
Another thing I noticed about the HDR support are those random dark lines that appear on images being rendered with the correct gainmap. They can be horizontal, or vertical, or not show at all seemingly at random. The also change and fade on zooming. Another odd thing about them is, that they even show up on screenshots
And then, after zooming:
If I find the time, I'm going to dig around the code and do some testing, maybe I can get it fixed. 😄
Thanks for the great work on this app, I'm really digging it! 💪🏻
Oh those lines are actually how subsampling works, I find it weird that would show up in HDR mode, even weirder that they are visible in the screenshots as well
@IacobIonut01 yeah I found that very strange indeed... Forgot to mention that I was able to recreate this on the current 3.1.1-31118 nightly build.
oh this is funny they show up on Google photos as well
I've also found this online: https://support.google.com/pixelphone/thread/312390964/black-lines-on-photo-when-zoomed-in?hl=en
So the issue might not be specific to the gallery app
I've also found this online: https://support.google.com/pixelphone/thread/312390964/black-lines-on-photo-when-zoomed-in?hl=en
So the issue might not be specific to the gallery app
Fun
So the issue might not be specific to the gallery app
It is true that it happens in Google Photos as well, but it happens much more often in Gallery.
I'm experiencing the issue as well on a Pixel 8a with the v3.1.2 (312094) on Android 15
I haven't seen any issues so far on 4.0.0 with P10 Pro