I think I found the reason why the gain map isn't showing any effect:
There seem to be two private {MakerApple} EXIF tags controlling the HDR effect.
The one @anteo83 mentioned (0x21) seems to control the global boost to brightness. I guess via some kind of gamma curve tone mapping.
But there is also the 0x30 which controls how much the embedded gain map adds to the effect. It seems to range between 0.0 and 8.0, with 0.0 having the biggest effect.
When 0x30 is present, 0x21 doesn't need to be present to show the effects of the gain map. They also seem to work in tandem, with 0x21 adding to the global value and 0x30 controlling local values via gain map.
There is some great fun to be had with this. Check out the attached image on your XDR or OLED device in Photos. 😁
Edit: I was trying to attach an example image here, but Forums seem to convert the image, losing the gain map in the process. You can find it here.
Topic:
Programming Languages
SubTopic:
Swift
Tags: