anteo / edit-hdr-gamma

Automator App for editing HDR gamma of images in MacOS photo gallery
17 stars 0 forks source link

Add Support for iOS: CustomRendered=2 #1

Open lazing opened 1 year ago

lazing commented 1 year ago

Thanks a lot for this cool app.

But found the Photos App iOS does NOT display in HDR mode.

Here is something I found, may be useful.

The good news with this mode is its really easy to flag a file this way, and with some care when editing in Lightroom, and a quick EXIF edit, you can get brighter highlights on your SLR/mirrorless photos. The EXIF flag Photos is looking for is the “CustomRendered” flag. The camera apps on older iPhones sets this flag when in bracketed HDR mode. A value of “3” indicates a bracketed photo that also had a regular non-HDR copy saved, a value of “2” indicates no original was saved. Assuming you’re using EXIFTool, you can run it like this:

exiftool -overwrite_original_in_place -preserve ‘-CustomRendered=2’ <path to photos>
lazing commented 1 year ago

sorry for the issue.

I test it. If change photos outside the App and re-import, it works. It seems apple limit the change of the meta data or the file not modified.

Above setting just add a HDR tag to the photo

lazing commented 1 year ago

update:

The issue may cause by incorrect version of icloud photo.

  1. edit photos direct in Photos App, macbook display correct but no update action
  2. iPhone photos not sync.
  3. duplicate photo with iPhone, the new Photo shows correct, but the old has no change. ( same local lan)
  4. revert photo with iPhone to the original, photo not change
anteo commented 1 year ago

Yes, I also noticed this issue, but have no workaround except of you provided or my own. Looks like iOS caches some parameters, including HDR gamma, when it is updated outside it doesn't update in iOS gallery.

The only way I found to update the HDR gamma on iOS is to make slight edit of the photo with changed HDR gamma in Photos app (it is enough to change any parameter, e.g. Brightness or Exposure a bit, so "Apply" button becomes available), after the photo was synchronized with iCloud, it applies HDR gamma as well.

Or create a duplicate of photo, as you suggested, but it ruins the idea of making change in single photo only.

I'd need to reflect this information in README

romigbennelli commented 1 year ago

Hello! I think the iOS workaround might be a kind of fortunate bug, because in iOS17, it doesn't work anymore.

It's probably related to the changes they made in the API to support (and modify) gain map HDR and ISO HDR. The good news is that now Photos app (on iOS17) supports HLG stills in HDR and HEIF 10 bits, albeit not fully. The bad news is that gain map HDR has changed, maybe and AVIF is still unsupported.

Anyway, maybe you'll find redemption in iOS17 and macOS Sonoma and update your script to support the official way. Have a good day!