mattiasw / ExifReader

A JavaScript Exif info parser.
Mozilla Public License 2.0
769 stars 89 forks source link

Lens model doesn't seem to be parsed correctly #300

Closed LaurenceHo closed 5 months ago

LaurenceHo commented 6 months ago

Description

Lens model doesn't seem to be parsed correctly. I use PhotoScapeX to inspect my photo, I can see the lens model metadata, however, "LensModel" is empty by using ExifReader.

Additional details

How to reproduce

  1. Uploaded photo to https://mattiasw.github.io/ExifReader/esm/
  2. I didn't see LensModel on the tag list, however, it exists since I can see it from another software (PhotoScapeX)

Screenshot 2024-04-20 102659

What I expected would happen:

I should be able to see the value inside the LensModel tag.

What really happened: There is no LensModel tag.

Screenshot_20-4-2024_102541_mattiasw github io

LaurenceHo commented 6 months ago

I checked another repo which relates to ExifTags too:

https://github.com/python-pillow/Pillow/blob/f8160b858aebf8b7bffdefba48735feac300a060/src/PIL/ExifTags.py#L206

and this is yours

https://github.com/mattiasw/ExifReader/blob/ac01b16e657a94b605a1cc54ff6b217809d7bd77/src/tag-names-exif-ifd.js#L370

Both of them are basically identical. Have any idea about this?

mattiasw commented 6 months ago

Hi! There are several possible reasons for this. I need the image to be able to investigate.

LaurenceHo commented 5 months ago

Ciao! I think this issue is a bit tricky. Today I just realised that I could see the lens model from other photos taken from another camera (Canon). Just let you know about this. I can send you the photo if you'd like to investigate.

mattiasw commented 5 months ago

Please do if you can. It would be interesting to see why this happens for this photo.

LaurenceHo commented 5 months ago

Please do if you can. It would be interesting to see why this happens for this photo.

Hi, I uploaded 4 photos to my demo album website https://d3lfuof5usiolc.cloudfront.net/album/2024/demo-album5

All of them have lens model information, however, only 2 of them can display lens models on the website. Feel free to download the photos. Thanks.

mattiasw commented 5 months ago

Thanks! The reason the lens model is not visible in two of the images is because the camera has put it in the maker notes which is a camera-specific proprietary field which does not follow any common metadata specification. It would unfortunately be both too much work and make the package too big to support all of those.

LaurenceHo commented 5 months ago

Thanks! The reason the lens model is not visible in two of the images is because the camera has put it in the maker notes which is a camera-specific proprietary field which does not follow any common metadata specification. It would unfortunately be both too much work and make the package too big to support all of those.

Thanks for the prompt investigation!! I now have some clues, I may make it work on my side. :D

mattiasw commented 5 months ago

In case it's helpful in any way it may be worth mentioning that it is possible to extract the raw binary data for the maker notes using ExifReader.