ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: sfmurph on July 26, 2014, 03:01:03 PM

Title: Can't set Olympus:LensType
Post by: sfmurph on July 26, 2014, 03:01:03 PM
It seems that there is some corruption of the value trying to be set, so it gets rejected by the CheckExif call.

$ exiftool -overwrite_original_in_place file.JPG -Olympus:LensType='Sigma APO 70-200mm F2.8 II EX DG Macro HSM' -v
Warning: Not enough values specified (6 required) for Olympus:LensType
Nothing to do.

Similar thing when trying to send a number:
$ exiftool -overwrite_original_in_place file.JPG -Olympus:LensType#='1 16 00'
Warning: Not enough values specified (6 required) for Olympus:LensType
Nothing to do.

I'm not sure what's going on here.
Title: Re: Can't set Olympus:LensType
Post by: Phil Harvey on July 26, 2014, 08:27:40 PM
Wow.  Nice catch.  That bug has probably existed for a long time.  It will be fixed in the version 9.69 release tomorrow.

- Phil
Title: Re: Can't set Olympus:LensType
Post by: sfmurph on July 27, 2014, 11:54:34 AM
OK, cool. Thanks.

A related issue (that may be user error, really):  I would also think I could set this with a hex number, but I get a different error:

$ exiftool -overwrite_original_in_place file.JPG -Olympus:LensType#=0x011600
Warning: Use of uninitialized value $a[2] in hex in Olympus:LensType (ValueConvInv)
Nothing to do.

But maybe this 0x011600 shouldn't be allowed.
Title: Re: Can't set Olympus:LensType
Post by: Phil Harvey on July 27, 2014, 01:58:27 PM
With the print conversion disabled as you have done, ExifTool accepts 3 hex numbers in the same format as the values in this table (https://exiftool.org/TagNames/Olympus.html#LensType).

You can see the format that ExifTool wants like this:

> exiftool a.jpg -olympus:lenstype#
Lens Type                       : 0 12 10


So I think this is what you are looking for:

> exiftool a.jpg -olympus:lenstype#="01 16 00"
    1 image files updated
> exiftool a.jpg -olympus:lenstype
Lens Type                       : Sigma APO 70-200mm F2.8 II EX DG Macro HSM
> exiftool -ver
9.69


- Phil