Main Menu

Changing LensID

Started by sche91, March 07, 2023, 08:31:24 AM

Previous topic - Next topic

sche91

Hello everyone.
I did some shots with Pentax K5-II + Sigma 55-200 F4-5.6 DC.
Somehow shots' are shown with different Lens IDs in RawTherappee and ExifTool output.


This is the output of exiftool $dng | grep -i lens
./55_200.DNG
Lens Type                       : Sigma Lens (3 255)
Lens Focal Length               : 55.0 mm
Lens ID                         : Sigma 55-200mm F4-5.6 DC

./70_300.DNG
Lens Type                       : Sigma Lens (3 255)
Lens Focal Length               : 72.5 mm
Lens ID                         : Sigma 70-300mm F4-5.6 Macro or Sigma 55-200mm F4-5.6 DC

./dl_75_300_2.DNG
Lens Type                       : Sigma Lens (3 255)
Lens Focal Length               : 200.0 mm
Lens ID                         : Sigma 55-200mm F4-5.6 DC

./dl_75_300.DNG
Lens Type                       : Sigma Lens (3 255)
Lens Focal Length               : 102.5 mm
Lens ID                         : Sigma DL Zoom 75-300mm F4-5.6 or Sigma 70-300mm F4-5.6 Macro or Sigma 55-200mm F4-5.6 DC


Lens Type seems to be the same.
Can I manually insert a string value into Lens ID? I would be useful for future edit of shots made with manual lenses.

I've been trying to insert a string with exiftool -overwrite_original lensid="QWERTY" $dng, but couldnt change anything.

Phil Harvey

Yes.  There are many Sigma lenses with the same LensType numbers.  For certain FocalLength/Aperture combinations ExifTool can rule out some of them.

You can tell ExifTool which lenses you own like this in a config file:

@Image::ExifTool::UserDefined::Lenses = (
    'Sigma 55-200mm F4-5.6 DC',
);

See the example config file for more information about ExifTool config files.

If you want to write a lens name to the file, you should write the LensModel tag.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

sche91

Aha. Thanks.

As I understand, camera writes value of "3 255" into a file Lens Type, then interpret it as a random Lens ID?

I have added config file into my home directory and now ExifTool shows proper lens in its output.
But I wanted to have proper lens IDs in RawTherapee.

But what about dot separated values noticed in Pentax Tags document? My lens is '3 255.8'= Sigma 55-200mm F4-5.6 DC
Are those values only for informational purpose and cannot be written into a file?

I realise that I can't write any string value into the Lens ID.
I can do it to Lens Model tag, but RawTherapee seems to ignore it and uses Lens ID.

Phil Harvey

Quote from: sche91 on March 08, 2023, 05:32:02 AMBut what about dot separated values noticed in Pentax Tags document? My lens is '3 255.8'= Sigma 55-200mm F4-5.6 DC
Are those values only for informational purpose and cannot be written into a file?

Yes.  These decimals are for internal purposes only.  In fact, there has been enough confusion about this that I will remove these decimals from the documentation in the next release.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).