Author Topic: Metadata not visible in SOME HEIC files outside of PM6+  (Read 5753 times)

Offline Gary D.

  • Newcomer
  • *
  • Posts: 45
    • View Profile
Metadata not visible in SOME HEIC files outside of PM6+
« on: March 06, 2022, 07:01:58 AM »
Im having an odd issue where metadata is not visible on some HEIC files outside of Photomechnic. 
I see the data while in PM+. I can extract the data using exiftools, but the data is not visible from the MACOS finder, Pixelmator Pro or when I import the images into Lightroom.

Here’s my Process.
Take images with iPhone in HEIC format. Not sure its relevant but I use a BW filter when I take the image.
On the iMac I go into the MacOS Photos app and export unmodified originals into a folder.
That produces the original HEIC files and the associated AAE files.

In PM6+. I apply  metadata templates, add keywords, and color rank the images. I’ll rename the images (AAE files don’t get renamed)
Normally I would  pass the keepers to Lightroom adjust and export the finished images.

BUT some of the images don’t have any PM6+ metadata in them when I look at them in LR.  I checked the files  using 'Get Info' in Finder and the same thing .. you can’t see the metadata in some of the images.  However I can extract the data using exiftool.
When I look at the LR exported images in PM6+ there is no metadata.
I originally thought it an issue with LR but as noted the data is not visible using Finder or other editing software.

I then run a exiftool scrip that will take metadata from the originals and update the edited images from LR.

Attached are two original  images one where the metadata visible and one where it is not.


Can’t nail it down exactly but going back through older images this behavior seems to have started last Nov or Dec. And I only see this behavior with other file formats.


Photo Mechanic Plus Version 6.0, build 6245 (14de08a)
 iMac Info
macOS 12.2.1
iMac (24-inch, M1, 2021)
Chip. Apple M1
Memory 16 GB



Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 469
    • View Profile
    • Camera Bits, Inc.
Re: Metadata not visible in SOME HEIC files outside of PM6+
« Reply #1 on: March 08, 2022, 02:48:38 PM »
I took a look at this and it appears that PM might be modifying other XMP "technical" metadata that iOS is writing by default (for an HDRGainMap).  Apparently an HEIC can have more than one block of XMP.  But only one should "point to" the primary item (the main image) for the purposes of IPTC or preference metadata (as used by PM).

The photo you posted that does NOT show XMP has only one XMP block and it has combined technical HDRGainMap and IPTC type metadata, but it points to a different item not the primary item.  So I changed this reference pointer to point to the primary item instead and this "fixes" the problem, but not really.  It should now show IPTC / preference metadata in Preview and I assume Adobe software.  But it may have "broken" the HDR metadata.  I don't know how to verify this, but if you can verify please that this modified photo shows XMP metadata in your other apps that would be good to know.

I will be updating PM to ignore this technical XMP and create a new XMP block for IPTC / preferences.  This should hopefully fix photos moving forward.  There may still exist a problem with HDR if Apple's code doesn't like the XMP packetizing that we add.

Stay tuned...

--dennis

Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 469
    • View Profile
    • Camera Bits, Inc.
Re: Metadata not visible in SOME HEIC files outside of PM6+
« Reply #2 on: March 08, 2022, 03:10:16 PM »
Also, the second image you posted that DOES "show" XMP metadata, I think perhaps you edited this photo with macOS Photos app first to add face recognition.  I suspect that Photos added the second XMP block that points to the primary item, and therefore subsequent editing by PM put additional XMP into this second (correct) XMP block.

So, a workaround for now would be to "touch" your files with Photos app first before editing with PM (until we have a fix).

HTH.

--dennis

Offline Gary D.

  • Newcomer
  • *
  • Posts: 45
    • View Profile
Re: Metadata not visible in SOME HEIC files outside of PM6+
« Reply #3 on: March 09, 2022, 05:09:31 AM »
Hey Dennis.   The metadata shows up correctly in Finder, Lightroom, and Pixelmator. I don't usually edit photos in the photo app but I'll take a look at touching something before export.  When I do the export from Photo I use the "Unmodified Originals" option which "removes" any edits anyway. ( I thought that change data got written to the AAE file).  I'll also check to see if there's something automatic going on when I take the photo.  Aside from the BW filter, I let the iPhone do its thing.. perhaps its doing some auto HDR process. I'll try to be more mindful of what the iPhone is  doing as well.
Thanks
Gary   

Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 469
    • View Profile
    • Camera Bits, Inc.
Re: Metadata not visible in SOME HEIC files outside of PM6+
« Reply #4 on: March 10, 2022, 04:27:35 PM »
Hi Gary,

We are trying to get a new update posted that fixes your issues, but we need a sample HEIC file from its original state before PM touched it.

We are having a hard time creating a photo from iPhone that has the HDRGainMap XMP in it (and only that XMP - not any other XMP relating to face recognition etc).

Can you take a photo that somehow kicks in HDR and make sure it doesn't have any faces that might trigger face recognition.

We need a photo like 20220303_005GDD.HEIC but BEFORE it has been touched by PM.  If you have that photo on your iPhone still, then maybe just AirDrop that to your Mac, then ZIP it up, then post?  Don't go through any other app.  If this doesn't work, then maybe it is Photos adding this HDRGainMap.  In that case we would need an HEIC after Photos app (but still NOT modified by PM).

Thanks for your help.

--dennis

Offline Gary D.

  • Newcomer
  • *
  • Posts: 45
    • View Profile
Re: Metadata not visible in SOME HEIC files outside of PM6+
« Reply #5 on: March 11, 2022, 08:10:08 PM »
Here's what I tested and I can pretty much reproduce the issue at will. In the camera app on my iPhone (ios15.3.1). When I shoot in low light the camera app is turning on "Night Mode". The camera app with take a multi second exposure.  In the camera app the Night mode icon is just next to the flash icon. When the lights are low that icon will turn yellow and show the seconds of the long exposure.  Use the flash or focus on a scene that is brighter and that icon will turn back to white (off).   I've attached two images the. IMG_500.HEIC was taken with flash and night mode turned off, IMG_501.HEIC was taken with night mode turned on .  I also had the Smart HDR setting turn on in the settings of the camera app. 
My process is
Take the pictures with the iPhone. Forced some to use night mode and some to not.
On my iMac I open the photos app and export the images using the "export unmodified originals" , I also UN-selected the export option to export IPCTC as XML.
Go into PM.  Just added a color rating.  Import this images into light room .
The Image with the Night Mode turned on did not show the color rating and the one taken without Night Mode does show the color rating.   I've done this several times and the results are consistent;

Let me know if you need more images.

Gary