photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: abgestumpft on October 04, 2021, 05:14:20 PM

Title: Metadata Mechanic: RAW values question
Post by: abgestumpft on October 04, 2021, 05:14:20 PM
Hi,

one question on Metadata Mechanic on writing RAW values:
Can this only write numbers (0-9) and not "." for floats?

When I write RAW value "131.7" (= Sigma 70-200mm f/2.8 APO EX HSM) to "Canon::CameraSettings\22\LensType\0", this ends up as "131" (= Canon EF 28-80mm f/2.8-4L USM or Sigma Lens)

For Canon lens types see: https://exiftool.org/TagNames/Canon.html#LensType (https://exiftool.org/TagNames/Canon.html#LensType)
Title: Re: Metadata Mechanic: RAW values question
Post by: Mario on October 04, 2021, 05:22:30 PM
What is your decimal separator? . or , ?
Did you try both?
Which user interface language for image are you using? Which app locale (Edit > Preferences > Application)?
Title: Re: Metadata Mechanic: RAW values question
Post by: abgestumpft on October 04, 2021, 05:26:47 PM
I used the "." -> copy&paste from ExifTool docu: "131.7"
Title: Re: Metadata Mechanic: RAW values question
Post by: abgestumpft on October 04, 2021, 05:43:33 PM
Mh, could be Exiftool related, or I'm missing something else...
Just a quick test on command line:

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -n -LensType  "test.jpg"
---- Canon ----
LensType                        : 131

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -n -canon:lenstype=132.7  "test.jpg"
    1 image files updated

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -n -LensType  "test.jpg"
---- Canon ----
LensType                        : 132

Title: Re: Metadata Mechanic: RAW values question
Post by: abgestumpft on October 04, 2021, 05:59:34 PM
Could really be a exiftool-bug
In Exiftool (and iMatch) I can usually also provide LensType="<LensName>" and exiftool will convert it to a number.
E.g.

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -canon:lenstype="Canon EF 70-200mm f/2.8L USM"  "test.jpg"
    1 image files updated

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -n -LensType  "test.jpg"
---- Canon ----
LensType                        : 165

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -LensType  "test.jpg"
---- Canon ----
LensType                        : Canon EF 70-200mm f/2.8L USM



When doing the same with the Sigma:
C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -canon:lenstype="Sigma 70-200mm f/2.8 APO EX HSM"  "test.jpg"
    1 image files updated

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -n -LensType  "test.jpg"
---- Canon ----
LensType                        : 131

C:\Test>"C:\Program Files\photools.com\imatch6\exiftool.exe" -g1 -s -LensType  "test.jpg"
---- Canon ----
LensType                        : Canon EF 28-80mm f/2.8-4L USM or Sigma Lens

Title: Re: Metadata Mechanic: RAW values question
Post by: Mario on October 04, 2021, 06:13:45 PM
Maybe ask Phil?
Did you check that the RAW tag data in the database is correct?
When you write-back you can see what IMatch is sending to ExifTool in the Output panel.
Title: Re: Metadata Mechanic: RAW values question
Post by: abgestumpft on October 04, 2021, 07:07:00 PM
It works as designed:
https://exiftool.org/TagNames/Canon.html#LensType (https://exiftool.org/TagNames/Canon.html#LensType)
QuoteDecimal values have been added to differentiate lenses which would otherwise have the same LensType, and are used by the Composite LensID tag when attempting to identify the specific lens model.

https://exiftool.org/forum/index.php?topic=3895.0 (https://exiftool.org/forum/index.php?topic=3895.0)
QuoteIn reality, decimal lens ID doesn't exist. Because third pary lenses (Sigma, Tokina,etc.) use the same ID values as Canon, Phil decided to put decimal point (for such cases) into documentation. That is, ID=4 means Canon lens was used, but it could also be Sigma, etc.

https://exiftool.org/TagNames/Composite.html (https://exiftool.org/TagNames/Composite.html)

LensID (Not writable:)
LensType
FocalLength
MaxAperture
MaxApertureValue
MinFocalLength
MaxFocalLength
LensModel
LensFocalRange
LensSpec
LensType2
LensType3
LensFocalLength
RFLensType


The issue I had was that the lens showed up (after I added 131 to Canon lens ID) as a lot tags like:
Unknown (131) 14379 - 11008mm
Unknown (131) 14381 - 11264mm
Unknown (131) 14381 - 11520mm
...

For canon it seems in that case the
Composite\Exif-LensID\LensID\0 = Unknown (<Canon::CameraSettings\22\LensType\0>) <Canon::CameraSettings\24\MinFocalLength\0> - <Canon::CameraSettings\23\MaxFocalLength\0>mm

I fixed this by setting:
Canon::CameraSettings\22\LensType\0 = 131
Canon::CameraSettings\24\MinFocalLength\0 = 70
Canon::CameraSettings\23\MaxFocalLength\0 = 200

-> now it is detected as "Sigma 70-200mm f/2.8 APO EX HSM"  8)

PS: already set before by me was:
Exif::Main\42036\LensModel\0 = "Sigma 70-200mm f/2.8 APO EX HSM"
XMP::exifEX\LensModel\LensModel\0 = "Sigma 70-200mm f/2.8 APO EX HSM"