Author Topic: Can EXIF be altered in Photo Mechanic?  (Read 10038 times)

Offline robgo2

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Can EXIF be altered in Photo Mechanic?
« on: August 14, 2017, 08:56:43 AM »
I am using Photo Mechanic v5.0. I wonder if it is possible to alter EXIF data that come from the camera. Specifically, I would like to change the focal length of the lens used in some situations. This need arises, because I am using non-Leica M-mount lenses on a Leica camera. The lenses are not 6-bit coded, but I am able to manually select a code in the camera that best fits the properties of a particular lens. Sometimes, this involves a Leica lens code for a different focal length, e.g. when using a ZM 35/1.4 lens, the code for Leica 28/2 works best. I understand that one can do this in Lightroom, but I do not use LR.

Thanks,
Rob

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Can EXIF be altered in Photo Mechanic?
« Reply #1 on: August 14, 2017, 08:59:02 AM »
Rob,

I am using Photo Mechanic v5.0. I wonder if it is possible to alter EXIF data that come from the camera. Specifically, I would like to change the focal length of the lens used in some situations. This need arises, because I am using non-Leica M-mount lenses on a Leica camera. The lenses are not 6-bit coded, but I am able to manually select a code in the camera that best fits the properties of a particular lens. Sometimes, this involves a Leica lens code for a different focal length, e.g. when using a ZM 35/1.4 lens, the code for Leica 28/2 works best. I understand that one can do this in Lightroom, but I do not use LR.

No, PM does not provide a way to modify the lens focal length.

ExifTool can do that however, and is free. https://www.sno.phy.queensu.ca/~phil/exiftool/

-Kirk

Offline robgo2

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: Can EXIF be altered in Photo Mechanic?
« Reply #2 on: August 14, 2017, 09:28:11 AM »
Thanks, Kirk.

Rob

Offline robgo2

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: Can EXIF be altered in Photo Mechanic?
« Reply #3 on: August 14, 2017, 05:14:07 PM »
I downloaded ExifTool and soon discovered that I do not do well with command line programs. Fortunately, I discovered another program, Exif Editor for Mac, that is more my speed. It appears to be quite simple and has everything I need. I bought it from the App Store for $10.99.

Rob

Offline andomar

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Can EXIF be altered in Photo Mechanic?
« Reply #4 on: May 18, 2020, 06:42:51 AM »

No, PM does not provide a way to modify the lens focal length.

ExifTool can do that however, and is free. https://www.sno.phy.queensu.ca/~phil/exiftool/


Unfortunately, PM is incompatible with files modified by ExifTool (or other Tools which modify the Exifdata in the Raw).

I had set the LensType with Exiftool on a Sony ARW file: everything fine - every software accepts this.
But if I then use PhotoMechnic (current version 6) to change for example the rating (with key 1) on this file, PM destroys that raw-file when persisting this information!
The raw-file is no longer readable with any program!
I also had a support request to Camera Bits regarding this: I was advised to configure PM not to write the rating directly into the raw file and to use sidecar files instead.
Not what I wanted to hear ...
Unfortunately for me this is a reproducible bug in PM.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Can EXIF be altered in Photo Mechanic?
« Reply #5 on: May 18, 2020, 10:15:24 AM »

No, PM does not provide a way to modify the lens focal length.

ExifTool can do that however, and is free. https://www.sno.phy.queensu.ca/~phil/exiftool/


Unfortunately, PM is incompatible with files modified by ExifTool (or other Tools which modify the Exifdata in the Raw).

I had set the LensType with Exiftool on a Sony ARW file: everything fine - every software accepts this.
But if I then use PhotoMechnic (current version 6) to change for example the rating (with key 1) on this file, PM destroys that raw-file when persisting this information!
The raw-file is no longer readable with any program!
I also had a support request to Camera Bits regarding this: I was advised to configure PM not to write the rating directly into the raw file and to use sidecar files instead.
Not what I wanted to hear ...
Unfortunately for me this is a reproducible bug in PM.

Do you have a file that you can share with us?  It would be best to have a file in three forms:

1) Unmodified ARW file.
2) ExifTool-modified ARW file.
3) PM-modified ARW file after.

Thanks,

-Kirk

Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 469
    • View Profile
    • Camera Bits, Inc.
Re: Can EXIF be altered in Photo Mechanic?
« Reply #6 on: May 18, 2020, 10:41:43 AM »
Unfortunately, PM is incompatible with files modified by ExifTool (or other Tools which modify the Exifdata in the Raw).

I had set the LensType with Exiftool on a Sony ARW file: everything fine - every software accepts this.
But if I then use PhotoMechnic (current version 6) to change for example the rating (with key 1) on this file, PM destroys that raw-file when persisting this information!
The raw-file is no longer readable with any program!

It would be useful to know exactly what command you typed in Exiftool, and whether you did this on a file that was already modified by PM.

We recommend you do not modify RAW files but instead use an XMP sidecar for metadata (not Exif).  When PM modifies a TIFF-based RAW file, we copy the TIFF table at the front of the file, insert the tags we need for metadata, then we write this to the end of the file and update the TIFF pointer at the front of the file to point to this new TIFF table.

However, we have the ability to completely undo this operation (with the Revert command) and get the file back to its original state exactly as it came off the camera in case other software fails to handle the relocated TIFF file.

It may be that you modified the file with Exiftool after PM had modified it.  It is unknown what this may do to the file.

If you tell PM to not modify your RAW files, then all the metadata goes into an XMP sidecar (as many other programs recognize).  Then you should be able to modify the RAW file in Exiftool.  However, this is NOT something we would recommend - to modify a proprietary file format without having a way to undo that modification.  It may be that if you modify the file first in Exiftool (without PM having touched it), then update in PM, then it would be fine.  But if you are using PM to ingest for example then it may be "too late".

Any files you have modified by PM that haven't been additionally modify by Exiftool, should be able to be reverted to original state.  Then change preferences to not modify RAW, then proceed.

HTH

--dennis

Offline andomar

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Can EXIF be altered in Photo Mechanic?
« Reply #7 on: May 19, 2020, 06:01:34 PM »
Do you have a file that you can share with us?  It would be best to have a file in three forms:
1) Unmodified ARW file.
2) ExifTool-modified ARW file.
3) PM-modified ARW file after.
Kirk, I sent you a link  to an archive with the requested example-files with the forum message function.
Hope to hear from you!

It would be useful to know exactly what command you typed in Exiftool, and whether you did this on a file that was already modified by PM.
Here is the command:
/usr/local/bin/exiftool <FILENAME> -overwrite_original -P -lensmodel="Meyer-Optik Goerlitz Orestor 2.8/100" -FocalLength="100"

It may be that you modified the file with Exiftool after PM had modified it.  It is unknown what this may do to the file.
Yes: my workflow is to ingest with PM, then sometimes modify the exif, and then do the rating with PM.
Btw: so far I was not aware that PM modifies the raw-files during import! ??? why?