Hello! There are many tips on the internet for supplementing Exif data of manual lenses. However, I noticed that most of them contain redundancies, like setting Aperture, ApertureValue and FNumber all to the same value. Same thing with Lens, LensID, LensType, LensModel etc. For example, I use the following arguments file:
-v0
-overwrite_original_in_place
-P
-m
-if
not $LensID or ($LensID eq "None" or $LensID eq "Unknown (65535)")
-LensMake=OLYMPUS IMAGING CORP.
-LensModel=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-LensID=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-LensType=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-Lens=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-LensSerialNumber=104085
-XMP:SerialNumber=104085
-MakerNotes:LensSerialNumber=104085
-MakerNotes:LensFirmware=Manual 35 mm
-MaxApertureValue=2.0
-MakerNotes:MaxApertureAtMinFocal=2.0
-MakerNotes:MaxApertureAtMaxFocal=2.0
-Aperture=0.0
-FNumber=0.0
-EXIF:FocalLength=90
-EXIF:FocalLengthIn35mmFormat=90
-MakerNotes:MinFocalLength=90
-MakerNotes:MaxFocalLength=90
Can we not just set Aperture (and have ApertureValue, FNumber) set too? And isn't it enough to set LensModel? Thanks in advance for any hints on how to optimize this arguments file. I hope this question is not to detailed.
Andreas
Hi Andreas,
Aperture and LensID are non-writable Composite tags (https://exiftool.org/TagNames/Composite.html). To write these unfortunately means writing the tags upon which they are based. However, in general one usually shouldn't worry about writing all of the various MakerNotes lens information tags. To maintain consistency for EXIF Aperture, I would recommend writing FNumber and deleting ApertureValue.
- Phil
Thanks for link and the information.
Sorry to bother with more questions.
(1) Why FNumber? Wouldn't it be better to write Aperture, as it derives from FNumber and ApertureValue?
(2) Exiftool never creates MakerNotes, right?
(3) The page refers a few Canon, Nikon, Olympus etc. tags in the "Derived" column. Is it true then that Composite tags also encompass MakerNotes if they happen to exist?
(4) To set the Extender (http://www.exiftool.org/TagNames/Olympus.html (http://www.exiftool.org/TagNames/Olympus.html)) I'll have to write
-MakerNotes:Extender=0 04
because this field is an integer, right?
(5) The XMP:LensInfo tag is used by Adobe and apparantly by Exiftool in place of EXIF:LensSpecification. Im both cases this tag notes 4 rational values giving the focal range and aperture range of the lens. Say we have zoom lens f/4-5,6 70-300. Is it then correct to define:
-XMP:LensInfo=70/1 300/1 40/10 56/10
-EXIF:LensInfo=70/1 300/1 40/10 56/10
-MakerNotes:MaxApertureAtMinFocal=4.0
-MakerNotes:MaxApertureAtMaxFocal=5.6
Or is just -LensInfo enough? And why the different fractional notations (e.g. 40/10 and 56/10
make exiftool complain).
P.S.: Getting a Perl error with version 9.10. Has this damaged any metadata in the affected images?
Error setting file time - DCIM/90-2/PC216393.JPG
Use of uninitialized value $tmpFile in utime at /usr/local/bin/exiftool line 2804.
and the warning
Warning: Expected one or more integer values in XMP-aux:LensID (ValueConvInv)
although this tag is documented as writable string (http://www.exiftool.org/TagNames/XMP.html (http://www.exiftool.org/TagNames/XMP.html)).
Andreas
Hi Andreas,
Quote from: Andreas S. on December 23, 2013, 01:08:03 AM
(1) Why FNumber? Wouldn't it be better to write Aperture, as it derives from FNumber and ApertureValue?
Because as I said, Composite:Aperture is not writable. I could make it writable, but then I would have to decide whether to write EXIF or XMP FNumber or ApertureValue, or a combination of these, and that choice is better left up to you.
Quote(2) Exiftool never creates MakerNotes, right?
Not from thin air, but they can be copied from another file.
Quote(3) The page refers a few Canon, Nikon, Olympus etc. tags in the "Derived" column. Is it true then that Composite tags also encompass MakerNotes if they happen to exist?
The Composite tags do draw from MakerNotes tags. If the group is not specified in the "Derived" column, then any tag with this name may be used (possibly from the MakerNotes if there are same-named tags in there).
Quote(4) To set the Extender (http://www.exiftool.org/TagNames/Olympus.html (http://www.exiftool.org/TagNames/Olympus.html)) I'll have to write
-MakerNotes:Extender=0 04
because this field is an integer, right?
This would be the numerical value, but by default ExifTool reads/writes the converted value.
Quote(5) The XMP:LensInfo tag is used by Adobe to store 4 rational values giving the focal range and aperture range of the lens. Say we have zoom lens f/4-5,6 70-300. Is it then correct to say:
-XMP:LensInfo=70/1 300/1 40/10 56/10
-MakerNotes:MaxApertureAtMinFocal=4/1
-MakerNotes:MaxApertureAtMaxFocal=56/10
and specify -n on the command-line?
Again, this is a numerical value. Normally ExifTool expects this in the form "70-300mm f/4-5.6", but in this particular case ExifTool is a bit more forgiving and what you have written will actually work.
QuoteP.S.: Getting a Perl error with version 9.10. Has this damaged any metadata in the affected images?
Error setting file time - DCIM/90-2/PC216393.JPG
Use of uninitialized value $tmpFile in utime at /usr/local/bin/exiftool line 2804.
Thanks for reporting this problem. I will look into it, but I don't think it should affect your images (other than the filesystem date/times).
Quoteand the warning
Warning: Expected one or more integer values in XMP-aux:LensID (ValueConvInv)
although this tag is documented as writable string (http://www.exiftool.org/TagNames/XMP.html (http://www.exiftool.org/TagNames/XMP.html)).
Yes, this is a string because it may be more than one integer, separated by spaces (odd, I know, but that's how things work in XMP). This is used to store the numerical lens ID.
- Phil
Thank you for this information. This makes sense.
What I don't understand is that the Olympus-tags MaxAperture, MaxApertureAtMinFocal and MaxApertureAtMaxFocal are documented as int16u, but Exiftool allows me to write a fractional number like 2.8 into it. Is there some hidden divisor?
Another thing is MaxApertureValue. I'm not sure if Lightroom et. al. use this value. The point is that my camera, the Olympus E-5, writes this value as being 1.0 (this is probably some default). As the FNumber is unknown when I shot with a manual lens the camera can't calculate MaxApertureValue. Can Exiftool? Otherwise I rather set it to 0.0.
Interesting that Exiftool parses lens descriptions. This means for LensInfo one can write e.g. "AF-S DX NIKKOR 55-300mm f/4.5-5.6G ED VR" or 55 300 45/10 56/10?
When a Composite tag X is writable, then all the associated tags are written by Exiftool plus it creates Composite:X, right? When X is read again, and Composite:X already exists, then I presume Exiftool just uses Composite:X. It does the derivation only when Composite:X not exists?
I think for MWG-Composites the same rules apply as for Exiftool-Composites (only the manual for MWG Composites goes into the read/write details). Just want to get this right. Both Composite groups are really useful. Past has shown that it is better to rely on Exiftool than on any other software to derive tags from other tags, including Adobes'. Exiftool is less volatile.
Happy Christmas!
- Andreas
P.S.: This is the final version of the arguments file for the manual Zuiko lens I am using now, thanks to the information in this thread. The FNumber is zero because I've shot with various apertures.
-overwrite_original_in_place
-P
-v0
-if
not $LensID or ($LensID eq "None" or $LensID eq "Unknown (65535)" or $LensID eq "Zuiko OM AUTO-MACRO 1:2,0/90 mm")
-FNumber=0.0
-FocalLength=90
-FocalLengthIn35mmFormat=180
-LensMake=OLYMPUS IMAGING CORP.
-Lens=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-LensType=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-LensModel=Zuiko OM AUTO-MACRO 1:2,0/90 mm
-EXIF:LensSerialNumber=104085
-Olympus:LensSerialNumber=104085
-MaxAperture=2.0
-MaxApertureAtMinFocal=2.0
-MaxApertureAtMaxFocal=2.0
-MaxApertureValue=0.0
-XMP:LensInfo=90 90 2/1 2/1
-EXIF:LensInfo=90 90 2/1 2/1
-MinFocalLength=90
-MaxFocalLength=90
In my tests I saw that -LensSerialNumber=90 is enough to write EXIF:LensSerialNumber and Olympus:LensSerialNumber, as both groups have the same name. But the E-5 does not create Olympus:LensSerialNumber when a manual lens is attached. Therefore the explicit group names. Same thing with LensInfo.
Quote from: Andreas S. on December 24, 2013, 03:24:26 AM
What I don't understand is that the Olympus-tags MaxAperture, MaxApertureAtMinFocal and MaxApertureAtMaxFocal are documented as int16u, but Exiftool allows me to write a fractional number like 2.8 into it. Is there some hidden divisor?
Yes, or some formula to do the conversion. In the Pentax tags documentation I have added these formulas in the Notes section for a number of tags, but I haven't done this for Olympus. I agree that the documentation is misleading because the Writable column gives the format of the raw value, but exiftool extracts a converted value. See the Value Conversions section here (https://exiftool.org/under.html#conversions) for some insight.
QuoteAnother thing is MaxApertureValue. I'm not sure if Lightroom et. al. use this value. The point is that my camera, the Olympus E-5, writes this value as being 1.0 (this is probably some default). As the FNumber is unknown when I shot with a manual lens the camera can't calculate MaxApertureValue. Can Exiftool? Otherwise I rather set it to 0.0.
I'm not sure exactly what you mean by calculating MaxApertureValue. From what?
QuoteInteresting that Exiftool parses lens descriptions. This means for LensInfo one can write e.g. "AF-S DX NIKKOR 55-300mm f/4.5-5.6G ED VR" or 55 300 45/10 56/10?
Right. I added quite a bit of special logic when writing LensInfo to allow for this. Perhaps I should document this. ;)
QuoteWhen a Composite tag X is writable, then all the associated tags are written by Exiftool plus it creates Composite:X, right?
Not exactly. The Composite tag doesn't represent something that is stored in the file. The derived tags are stored, and the Composite tag is generated on-the-fly from the derived values after they are extracted.
QuoteI think for MWG-Composites the same rules apply as for Exiftool-Composites (only the manual for MWG Composites goes into the read/write details). Just want to get this right. Both Composite groups are really useful.
The MWG tags are all Composite tags, but they contain some special logic and thus behave a bit differently than other Composite tags. Their behaviour is documented in the MWG Tags documentation.
QuoteExiftool is less volatile.
I try very hard to keep ExifTool as stable as possible.
QuoteHappy Christmas!
Thanks! You too!
- Phil
Quote from: Phil Harvey on December 24, 2013, 09:02:08 AM
I'm not sure exactly what you mean by calculating MaxApertureValue. From what?
As an APEX-Value maybe from FNumber, like
root-of-2^2.8.
Quote from: Phil Harvey on December 24, 2013, 09:02:08 AM
Right. I added quite a bit of special logic when writing LensInfo to allow for this. Perhaps I should document this. ;)
Presumably a bunch of smart regexes... :)
Quote from: Phil Harvey on December 24, 2013, 09:02:08 AM
The Composite tag doesn't represent something that is stored in the file. The derived tags are stored, and the Composite tag is generated on-the-fly from the derived values after they are extracted.
That was what I hoped! Exiftool does this on-the-fly creation also with
-s -g, right? I wasn't sure where the composite tags
-s shows came from, because no composite tags had been written to these photos. BTW,
-s -g print a lot of information that scrolls faster on a terminal than the eye can follow. Since tag names can't contain ":" I once tried
exiftool -Olympus: filename assuming it would print only Olympus-tags, but I just got "Invalid tag name Olympus:"...
Feliz Navidad!
P.S.: I've registered for a guided tour through the "observatorios" on Roque de los Muchachos (see IAC (http://www.iac.es/index.php?lang=en) and Wikipedia (http://en.wikipedia.org/wiki/Roque_de_los_Muchachos_Observatory)). Inside another manual lens is required, the Zuiko om 1.4 50 mm... setting its data should be no problem now. :) BTW the
Gran Telescopio Canarias is the world's largest telescope with a single-aperture lens. 2011 La Palma became the first UNESCO Starlight Reserve (http://de.wikipedia.org/wiki/UNESCO-Starlight_Reserve). There's a great paper about light pollution on the IAC website (La Palma Night-Sky Brightness (http://www.ing.iac.es/Astronomy/observing/conditions/skybr/skybr.html)). So La Palma is a great location for astro-photographers.
Quote from: Andreas S. on December 26, 2013, 04:26:58 AM
Quote from: Phil Harvey on December 24, 2013, 09:02:08 AM
I'm not sure exactly what you mean by calculating MaxApertureValue. From what?
As an APEX-Value maybe from FNumber, like root-of-2^2.8.
FNumber is the aperture when the picture was taken. MaxApertureValue is the maximum aperture value for the lens. You can't derive one from the other. You could perhaps derive MaxApertureValue from the lens model name though, if this is available.
QuoteThat was what I hoped! Exiftool does this on-the-fly creation also with -s -g, right?
Yes.
QuoteI wasn't sure where the composite tags -s shows came from, because no composite tags had been written to these photos. BTW, -s -g print a lot of information that scrolls faster on a terminal than the eye can follow.
You should be able to scroll back. If you are in Windows and the scrollback buffer isn't large enough, you can change the window properties to make it larger.
QuoteSince tag names can't contain ":" I once tried exiftool -Olympus: filename assuming it would print only Olympus-tags, but I just got "Invalid tag name Olympus:"...
This is done with
-olympus:all on the command line.
QuoteFeliz Navidad!
Thanks! And I hope you enjoy your observatory tour.
- Phil