Jump to content

Recommended Posts

Posted

I have an iPhone 13, which can take HDR photos but not in RAW format.

When I use the Panorama function in the built-in Camera app, the result is SDR and often distorted, so on my latest holidays I thought I'd take many photos planning to stitch them together afterwards somehow. I was happy to find AP has such a feature, and was quite happy with the results.

That is, until I imported the newly made panorama to my Photos app. It was SDR, which is IMO a significant reduction in quality and prevents me from replacing the multiple shots with the single panorama I wanted in the first place. Not knowing what the issue was, I posted on these forums trying to find out what was going on, if I was doing something wrong.

After some help from your staff and going down a rabbit hole that took me to discussions on Github and tools made with Python, I found out that 1) .HEIC files do have a HDR gain map encoded as an auxiliary image, and 2) an EXIF tag needs to be set for the gain map to display properly on Photos. And even though all of this was based on unofficial data, it seems that Apple is opening up on how to handle such HDR files, as shown in a WWDC video from this year.

Setting the EXIF tag is something I can rely on 3rd-party tools for, but there's nothing I can do to about the HDR gain maps outside AP; it has to support .HEIC HDR gain maps in order to make HDR panoramas from such photos. That feature alone would make AP a front-row companion to Photos to me.

Hope such support someday finds its way to AP.

  • 2 weeks later...
Posted

I second this request. The documentation says "HEIF open 4 Includes depth map, loaded as second layer. Depth maps are upsampled." it should also say "HEIF open does not support the iphone gain maps that render the image in HDR" so we would all understand that for the moment the iphone HDR heic images cannot be properly opened with Afinity Photo 2.

  • 1 year later...
  • 1 month later...
Posted
On 10/18/2024 at 10:29 AM, iGeo said:

Can you share some more details about the Exif tag that needs to be set for hdr? And how to go about it?

Apple Photos in iPhone supports HDR without HDR gain maps as well. For example, HEIC in 10-bit or AVIF in 10- or 12-bit.

However if you already have a (inverse) tone-mapped HDR image as: an SDR image and a corresponding single-channel HDR gain map, you might be able to create an HEIC file that could work with Apple Photos by reverse engineering this article (roughly following these steps, which I haven't tried myself):

  1. Create a new "gain map" with appropriately chosen values for "maker33" and "maker48" that makes the script in the article above produce the original HDR gain map.
  2. Create a new HEIF file with the SDR image as the primary image and the above gain map (in an 8-bit greyscale form with half the resolution as the primary SDR image) stored as an auxiliary image with aux-type "urn:com:apple:photo:2020:aux:hdrgainmap" (https://github.com/strukturag/libheif can do that)
  3. Using exiftool, set the following tags:

Apple doesn't publish documentation to describe how an HEIC file with an HDR gain map can be created in a way that Apple supports it. So the above steps are just my guesses, and is definitely not reliable.

(Plug: If you want to convert an HDR HEIC file from your iPhone to a "normal" HDR file without gain maps, that could be read by AP, you can try this Python package that I made: https://github.com/johncf/apple-hdr-heic)

  • 1 month later...
Posted

I need to export my work to HEIC and Avif.

Affinity Designer | Affinity Photo | Affinity Publisher V2.6.2   ▪️  Mac: 2021 M1 MacBook Pro 16", 32GB memory, macOS Sequoia 15.4  ▪️  iPad: iPad Pro, 12.9": iPadOS 16.7.10, Apple Pencil 1

Posted

A big +1. Gain maps saved inside HEIC, AVIF, JPEG-XL AND JPEG formats will be important going forward. With HDR close to becoming mainstream, we will need Affinity apps to be able to generate and write gain maps to these file formats, so our files can be properly viewed on both SDR and HDR systems. 

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted

@BBG3 Is it an HDR image or an SDR image? If you want to export a normal SDR image, first export to PNG, then use a converter such as libavif or ImageMagick. For HDR, you need to export as a 32-bit PNG with PQ or HLG transfer function and use libavif for AVIF export, but the command line arguments are a bit complicated.

Posted

Hi @John15. Thank you for sharing that! You are awesome. ❤️ I mostly need to export my work for web purposes.

I got the Libavif from this link

https://formulae.brew.sh/formula/libavif

 

Affinity Designer | Affinity Photo | Affinity Publisher V2.6.2   ▪️  Mac: 2021 M1 MacBook Pro 16", 32GB memory, macOS Sequoia 15.4  ▪️  iPad: iPad Pro, 12.9": iPadOS 16.7.10, Apple Pencil 1

  • 5 months later...
Posted
On 1/12/2025 at 2:28 PM, Ldina said:

A big +1. Gain maps saved inside HEIC, AVIF, JPEG-XL AND JPEG formats will be important going forward. With HDR close to becoming mainstream, we will need Affinity apps to be able to generate and write gain maps to these file formats, so our files can be properly viewed on both SDR and HDR systems. 

Exactly. I was surprised to learn that Affinity couldn't do this. I may have to switch back to Photoshop.

Posted
37 minutes ago, lizardpeter said:

Exactly. I was surprised to learn that Affinity couldn't do this. I may have to switch back to Photoshop.

I recently discovered that Graphic Converter 12 (Mac only, I think) can export a 32-bit HDR PNG image created in Affinity to HEIC 10-bit and retain HDR capability on my MacBook Pro M4 running Sequoia. (Thanks, @Oufti). FWIW.

That doesn't diminish the fact that Affinity needs to be able to export to AVIF, HEIC, JPEG-XL and JPEG file formats, including gain maps. That's the future.

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.