Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panasonic Lens on Panasonic Body - but where is the Lens Make/Model!? #296

Open
Webreaper opened this issue Jun 3, 2021 · 6 comments
Open

Comments

@Webreaper
Copy link

Hi, this is really a question more than a bug. I have the attached image, which was taken on a Panasonic G9, with a Leica 100-400 lens. Exiftool can display the lens make and model (as a composite tag) but I'm blowed if I can find the tag when I run it through MetaDataExtractor... :)

My code looks like this:

                var subIfdDirectory = metadata.OfType<ExifSubIfdDirectory>().FirstOrDefault();

                if (subIfdDirectory != null)
                {
                    var lensMake = subIfdDirectory.SafeExifGetString(ExifDirectoryBase.TagLensMake);
                    var lensModel = subIfdDirectory.SafeExifGetString(ExifDirectoryBase.TagLensModel);
                    var lensSerial = subIfdDirectory.SafeExifGetString(ExifDirectoryBase.TagLensSerialNumber);

If I use the same lens on my Olympus EM5-Mk2, this pulls out the lens make and model. But on the G9 it doesn't - I'm presuming it's in some other tag? But I can't find it. Any hints on a) where it is, and b) how to easily find the tag in future? Is there a 'dump all' method for MetaDataExtractor which will give me the NVPs so I can grep? :)

_1022798

@drewnoakes
Copy link
Owner

If it's supported, it's likely to be in a Panasonic makernote directory. My advice would be to iterate through all tags in all directories and print them out. If you cannot find it, please post more details about the missing field, or even put together a pull request that adds support. It's likely just a new method in a descriptor class to look up a number in a table.

@Webreaper
Copy link
Author

Thanks - good ideas. I added the tag dump, and sure enough it's there, under "Panasonic Makernote", with the tag "Lens Type".

I guess ExifTool has some extra logic that generates a composite tag for Lens Make/Model and pulls in the relevant info from various OEM Makertags. Does MetaDataExtractor have the same? If so, I'll have a rummage in the code and submit a PR so that this works with the generic 'Lens Make' and 'Lens Model' tags.

@drewnoakes
Copy link
Owner

I guess ExifTool has some extra logic that generates a composite tag for Lens Make/Model and pulls in the relevant info from various OEM Makertags. Does MetaDataExtractor have the same? If so, I'll have a rummage in the code and submit a PR so that this works with the generic 'Lens Make' and 'Lens Model' tags.

This sounds similar to #278 and drewnoakes/metadata-extractor#10. We don't have anything like this yet. If you have ideas for a design here, let's discuss it on #278.

@drewnoakes
Copy link
Owner

@Webreaper are you happy to share your image with the project for regression testing purposes? We don't have an E5-Mk2 sample.

If so I'll add it to this repo: https://github.com/drewnoakes/metadata-extractor-images

@Webreaper
Copy link
Author

The image attached above is from a Panasonic G9, with a Panasonic Leica 100-400 lens.

I can attach a sample OMD EM5 Mk2 image if that'll be useful for you. :)

@Webreaper
Copy link
Author

Here's an OMD EM5 Mk2 image you can add to the DB.
P3200002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants