ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:01 AM

Title: Writing EXIF
Post by: Archive on May 12, 2010, 08:54:01 AM
[Originally posted by leprish on 2007-03-05 21:14:35-08]

With many older Canon cameras the lens info recorded in EXIF is in a shortform such as "24.0-105.0 mm" whereas more recent models would show this as "EF24-105mm f/4 IS USM" The ExifTool user guide suggests that it's possible to write the newer data into existing files but I have no idea what form the command line would take. Being able to batch write such info would also be useful but again it's not clear how this can be done. Any advise would be appreciated.
Title: Re: Writing EXIF
Post by: Archive on May 12, 2010, 08:54:01 AM
[Originally posted by exiftool on 2007-03-06 13:01:26-08]

The Canon LensType information is stored in the maker notes of some canon
models.  The structure of the maker notes is model specific, and ExifTool will
not allow you to add additional tags which don't normally appear in the maker
notes for a model.

So the best option is to write this information to the XMP.  I suggest using the
new LensModel tag recently introduced by Microsoft (you need ExifTool version
6.75 or later).  This tag can be written to any image.   The command could look
something like this:

Code:
exiftool -if "$lens eq '24.0-105.0 mm'" "-xmp:lensmodel=EF24-105mm f/4 IS USM" -r DIR

This command will set the XMP LensModel tag to the specified string for all images
in DIR which report a Lens of '24.0-105.0 mm'.  (Note that the quotation marks used
should work for Windows, but for Unix systems single quotes must be used around
the '$' to prevent expansion by the shell.)

I hope this helps.

- Phil