ExifTool Forum

General => Metadata => Topic started by: Driverseat on November 10, 2019, 03:15:49 PM

Title: Update LensSpecification & LensInfo
Post by: Driverseat on November 10, 2019, 03:15:49 PM
Hi, I wonder how I can set LensSpecification & LensInfo to another value.
Using exiftool -LensSpecification=XXX does not work and I do not know what/how to put XXX. It is expected to be rational64u[4] but I do not know the syntax/format.
Could you please provide examples for both LensSpecification as well as LensInfo.
Thanks, Mark
Title: Re: Update LensSpecification & LensInfo
Post by: StarGeek on November 10, 2019, 05:21:39 PM
What the EXIF standard calls LensSpecification is called LensInfo by exiftool.  It requires four 64 bit unsigned rational numbers to represent the following values:
Value 1 := Minimum focal length (unit: mm)
Value 2 : = Maximum focal length (unit: mm)
Value 3 : = Minimum F number in the minimum focal length
Value 4 : = Minimum F number in the maximum focal length

So, just making up numbers, if you set
exiftool -LensInfo="5 10 100 200" FILE.JPG
and then list the lens info you get
C:\>exiftool -LensInfo="5 10 100 200" y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -g1 -a -s -lensinfo y:\!temp\Test4.jpg
---- ExifIFD ----
LensInfo                        : 5-10mm f/100-200