exiv2 icon indicating copy to clipboard operation
exiv2 copied to clipboard

Canon lens handling regression in 0.28.0

Open douzzer opened this issue 1 year ago • 20 comments

Describe the bug

Up to and including 0.27.7-release, I'm able to get correct lens detection for this lens setup in Darktable, by putting this in ~/.exiv2:

[canon]
748=Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x extender

But with 0.28.0-release, that doesn't work anymore, and the lens is misdetected as Tamron. Nothing else I've tried has worked. In particular, when I tried patching out the conflicting Tamron lenses, Darktable reported "Lens 748 not found" or words to that effect, even though obviously the Canon 748 entry is still there. This is the patch I tried:

--- exiv2-0.28.0/src/canonmn_int.cpp.dist       2023-05-08 11:01:13.000000000 -0500
+++ exiv2-0.28.0/src/canonmn_int.cpp    2023-08-26 12:42:58.326572444 -0500
@@ -1865,8 +1865,6 @@ constexpr TagDetails canonCsLensType[] =
                                           {747, "Canon EF 100-400mm f/4.5-5.6L IS II USM"},
                                           {747, "Tamron SP 150-600mm f/5-6.3 Di VC USD G2"},  // 1
                                           {748, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x"},
-                                          {748, "Tamron 100-400mm f/4.5-6.3 Di VC USD + 1.4x"},  // 1
-                                          {748, "Tamron 70-210mm f/4 Di VC USD + 2x"},           // 2
                                           {749, "Tamron 100-400mm f/4.5-6.3 Di VC USD + 2x"},
                                           {749, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 2x"},  // 1
                                           {750, "Canon EF 35mm f/1.4L II USM"},

The most worrisome syndrome though is that the override entry in ~/.exiv2 is being ignored.

To Reproduce

I've posted a CR2 with this lens here

(github has a 25MB attachment limit, and doesn't allow CR2 files besides.)

I'm running Darktable 4.4.2 but it wasn't the variable, and it's detecting the lens correctly when built and linked against exiv2-0.27.7.

To see the syndrome, set up the ~/.exiv2 above, import the picture into DT, and admire the detected lens ID on the left.

Note that you'll see the no-lens-info error in the lens correction tool for both the Canon and Tamron versions of ID 748. I run a Lensfun with the correction data for the Canon setup patched in.

Expected behavior

In the left pane with the image attributes, the lens entry should read

Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x extender

(Which is what it says when built+linked with v0.27.7, and it's what I have in my ~/.exiv2.)

Desktop (please complete the following information):

  • Gentoo
  • exiv2 0.27.7 vs 0.28.0
  • gcc-11.4.1
  • built out of Gentoo portage. with these use flags:
 U I
 - - abi_x86_32 : 32-bit (x86) libraries
 + + bmff       : Add support for the ISOBMFF format
 - - doc        : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - examples   : Install examples, usually source code
 + + nls        : Add Native Language Support (using gettext - GNU locale utilities)
 + + png        : Add support for libpng (PNG images)
 - - test       : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 - - webready   : Support reading metadata over the internet
 + + xmp        : Enable support for Extensible Metadata Platform (Adobe XMP)

Additional context

I believe this DT issue relates: https://github.com/darktable-org/darktable/issues/14882

douzzer avatar Aug 26 '23 20:08 douzzer

seems to be dependent on camera or lens:

Canon 7D:

exiv2 -pt --grep lens/i /c/Users/.../20130625-IMG_5459.CR2
Exif.CanonCs.LensType                        Short       1  Canon EF 24-105mm f/4L IS USM
Exif.CanonCs.Lens                            Short       3  24.0 - 105.0 mm
Exif.Canon.LensModel                         Ascii      74  EF24-105mm f/4L IS USM
Exif.CanonLe.LensSerialNumber                SLong       1  1980760064
Exif.Photo.LensSpecification                 Rational    4  24-105mm
Exif.Photo.LensModel                         Ascii      23  EF24-105mm f/4L IS USM

Canon M6:

exiv2 -pt --grep lens/i /c/Users/.../20170604-IMG_0790.CR2
Exif.CanonCs.LensType                        Short       1  Unknown Lens (254)
Exif.CanonCs.Lens                            Short       3  100.0 mm
Exif.Photo.LensSpecification                 Rational    4  100mm
Exif.Photo.LensModel                         Ascii      28  EF100mm f/2.8L Macro IS USM
Exif.Photo.LensSerialNumber                  Ascii      11  0000008672

Canon 5DmIV:

exiv2 -pt --grep lens/i /c/Users/.../20210227-IMG_0511.CR2
Exif.CanonCs.LensType                        Short       1  Unknown Lens (747)
Exif.CanonCs.Lens                            Short       3  100.0 - 400.0 mm
Exif.Canon.LensModel                         Ascii      74  EF100-400mm f/4.5-5.6L IS II USM
Exif.CanonLe.LensSerialNumber                SLong       1  -1879011276
Exif.CanonAfC.USMLensElectronicMF            SLong       1  Enable After AF
Exif.CanonAfC.LensDriveWhenAFImpossible      SLong       1  Continue Focus Search
Exif.Photo.LensSpecification                 Rational    4  100-400mm
Exif.Photo.LensModel                         Ascii      33  EF100-400mm f/4.5-5.6L IS II USM
Exif.Photo.LensSerialNumber                  Ascii      11  3490009075

Canon R6 - EF Lens: exiv2 -pt --grep lens/i /c/Users/.../IMG_3123.CR3

Exif.Photo.LensSpecification                 Rational    4  100mm
Exif.Photo.LensModel                         Ascii      28  EF100mm f/2.8L Macro IS USM
Exif.Photo.LensSerialNumber                  Ascii      11  0000008672
Exif.CanonCs.LensType                        Short       1  Unknown Lens (254)
Exif.CanonCs.Lens                            Short       3  100.0 mm
Exif.CanonFi.RFLensType                      SShort      1  n/v
Exif.Canon.LensModel                         Ascii     138  EF100mm f/2.8L Macro IS USM
Exif.CanonLe.LensSerialNumber                SLong       1  -2046820352
Exif.CanonAfC.USMLensElectronicMF            SLong       1  Enable After AF
Exif.CanonAfC.LensDriveWhenAFImpossible      SLong       1  Continue Focus Search

Canon R6 - RF Lens:

exiv2 -pt --grep lens/i /c/Users/.../20231008-IMG_0599.CR3
Exif.Photo.LensSpecification                 Rational    4  24-105mm
Exif.Photo.LensModel                         Ascii      23  RF24-105mm F4 L IS USM
Exif.Photo.LensSerialNumber                  Ascii      11  7413007751
Exif.CanonCs.LensType                        Short       1  Canon RF 24-105mm F4-7.1 IS STM
Exif.CanonCs.Lens                            Short       3  24.0 - 105.0 mm
Exif.CanonFi.RFLensType                      SShort      1  Canon RF 24-105mm F4L IS USM
Exif.Canon.LensModel                         Ascii     138  RF24-105mm F4 L IS USM
Exif.CanonLe.LensSerialNumber                SLong       1  1996493684
Exif.CanonAfC.USMLensElectronicMF            SLong       1  Enable After AF
Exif.CanonAfC.LensDriveWhenAFImpossible      SLong       1  Continue Focus Search

MStraeten avatar Oct 11 '23 15:10 MStraeten

I've noticed something interesting about the Exif.CanonLe.LensSerialNumber values shown above. -1879011276 in hex is 90009034, which is a rearrangement of the first eight characters of the Exif.Photo.LensSerialNumber value 3490009075. Similarly -2046820352 in hex is 86000000 for a lens with serial number 0000008672, and 1996493684 in hex is 77001374, serial number 7413007751.

My Canon EOS 100D with 18-55mm kit lens reports:

Exif.CanonLe.LensSerialNumber                SLong       1  422576128
Exif.CanonLe.0x0001                          SLong       1  129
Exif.Photo.LensSerialNumber                  Ascii      11  0000301981

422576128 in hex is 19300000 and 129 in hex is 81. Join those bytes together in the right order and you get the complete serial number 0000301981.

I spotted this while investigating #2138 - is it possible that Exif.CanonLe.LensSerialNumber should actually be a 6-byte hex coded value instead of a 4 byte integer?

jim-easterbrook avatar Dec 13 '23 16:12 jim-easterbrook

A brief follow-up:

Yesterday, motivated by CVE-2023-44398, I finally put together a workaround that restored functionality (and then some) for Canon lenses with extenders. To get it to work right, two patches were needed:

  • Patch out the conflicting 3rd party lenses in src/canonmn_int.cpp, so that the mapping from lens ID number to model name is unique and well-behaved.
  • Patch lensfun to parse the vital statistics from lens model names with extenders/reducers/etc.

My strategy isn't generally applicable because it removes all support for 3rd party EF mount lenses with conflicting ID numbers, but it probably points in the direction of how to resolve the problem.

And it is well to note, the problem seems to be a system-level interaction between exiv2 and lensfun.

Lensfun patch attached for reference. parse_lens_name_extenders.patch.txt

douzzer avatar Dec 27 '23 17:12 douzzer

Hello all.... forgive me, I did'nt read to all this thoroughly, as I am not feeling well.

I have similar case (gentoo, exiv2-0.28.1) but with Nikon camera and Tamron lense (70/200 2.8 Di G2) it was recognized well in the past, but not anymore. It get listed as ID=226, even well implemented in ~/.exiv2

AxelG-DE avatar Jan 07 '24 17:01 AxelG-DE

BTW gentoo also has a lensfun trouble. Only Version 0.3.4_rc1 is available, which is afaik not the official stable version.

With that 0.3.4_rc1, the lensfun-update-data does not work (bug is opened since long time). Donno how much this can be related

AxelG-DE avatar Jan 07 '24 19:01 AxelG-DE

either @douzzer or maybe @kmilos would you mind changing the title, as I have strong indication it is not just canon lenses but also the Tamron 70/200 2.8 G2 connected to my Nikon D750?

Do you need me to provide some prove? If yes, what do you need me to do?

AxelG-DE avatar Jan 08 '24 19:01 AxelG-DE

Do you need me to provide some prove?

Yes, please. For example exiv2 ex extracted data and exiv2 -Pkvt output for the current 0.28.1 failing case and the previously working older one.

kmilos avatar Jan 08 '24 21:01 kmilos

@kmilos per your request :)

the current situation: grafik

$ exiv2 ex 2023-12-29_151301_AG7_9385.NEF
Warning: Exif tag Exif.NikonPreview.JPEGInterchangeFormatLength not encoded
Warning: Exif IFD NikonPreview not encoded
Warning: Exif tag Exif.Photo.MakerNote not encoded
Warning: Exif tag Exif.NikonSi02xx.0x027a not encoded
Warning: Exif tag Exif.Nikon3.0x00bc not encoded

and here the output of -Pkvt exiv2_current_Pkvt_20240109.txt

and here comes the former scenario (hopefully because I cannot downgrade to exiv2-0.27......

first a screenshot: grafik

$ exiv2 ex 2018-01-08_180136_AG7_1503.NEF
Warning: Exif tag Exif.NikonPreview.JPEGInterchangeFormatLength not encoded
Warning: Exif IFD NikonPreview not encoded
Warning: Exif tag Exif.Photo.MakerNote not encoded
Warning: Exif tag Exif.NikonSi02xx.0x027a not encoded
Warning: Exif tag Exif.Nikon3.0x00bc not encoded

and here the output of -Pkvt

exiv2_former-scenario_Pkvt_20240109.txt

I used diff and there is no difference :-(

my .exiv2

$ cat .exiv2

# how to locate, where this file should be:
# exiv2 --verbose --version --grep config_path
# first approach should be: 
# exiftool -G -n -Lens* PathToFileandFilename
# then use something like:
# [MakerNotes]    Lens ID Number                  : 226
# or if there is no Lens ID Number
# exiv2 -pv --grep lenstype/i PathToFileandFilename
# then use something like:
# 0x0201 OlympusEq    LensType                    Byte        6  2 0 5 16 0 17

[nikon]
#
#226=Tamron/ Tamron SP 70-200mm F/2.8 Di VC USD G2
#226=Tamron SP 70-200mm F/2.8 Di VC USD G2
226=Tamron SP 70-200mm F/2.8 Di VC USD G2

[olympus]
2 0 5 16 0 17=Lumix G 20mm F1.7 II Asph.
#0 0 35 0 1 0=Funny Wee Lens

[canon]
137=Tamron SP 24-70mm F/2.8 Di VC USD
502=TAMRON 17-35mm F/2.8-4 Di LD Aspherical (IF)

Tonight I have to focus on other priorities, so please understand, I will be a bit silent, but that topic really bothers me...

AxelG-DE avatar Jan 09 '24 07:01 AxelG-DE

Thanks for the data.

I used diff and there is no difference :-(

As the output between 0.27.x and 0.28.x is the same, and this lens was never in the internal database, can't really say this is the same bug.

Now added in https://github.com/Exiv2/exiv2/pull/2889

kmilos avatar Jan 09 '24 10:01 kmilos

@kmilos my data "former scenario" was also created with exiv2-0.28.1, just old files, where I did refresh the metadata via darktable at that time.

I have dependency blockage and hence cannot downgrade exiv2. That blockage is tricky for some reason, but this would digress here too much. Maybe in the next few days that resolves (as kde currently not fully upgraded due to missing other deps)

My major trouble is, that the ~/.exiv2 is not obayed

AxelG-DE avatar Jan 09 '24 10:01 AxelG-DE

my data "former scenario" was also created with exiv2-0.28.1, just old files, where I did refresh the metadata via darktable at that time

Well, that's not very useful here.

that topic really bothers me...

My major trouble is, that the ~/.exiv2 is not obayed

Back to square one then. We'll just have to wait until someone w/ "skin in the game" (or otherwise interested) digs into the code and fires up a debugger.

kmilos avatar Jan 09 '24 11:01 kmilos

my data "former scenario" was also created with exiv2-0.28.1, just old files, where I did refresh the metadata via darktable at that time

Well, that's not very useful here.

I am really sorry for this. Currently I do not see a way to downgrade exiv2 in gentoo.

  • usually it would work and re-emerge several packages
  • however, on top it complains kfilemetadata-5.112.0:5/5.112::gentoo is not available (even not in the rebuild list)
  • that is correct, because kfilemetadata is available at version 5.113.0 but that version cannot be installed due to many many other unresolved dependencies, which typically just resolve over time
  • once that is done, I may have a chance to downgrade exiv2
  • I know there are emerge-switches to ignore deps, but I am not familiar with it and it is kind of asking for trouble when it is above my head
  • (plus I got a flu, so my concentration is low)

I will amend as soon as any possible

AxelG-DE avatar Jan 09 '24 18:01 AxelG-DE

@kmilos

I made it to downgrade exiv-0.27.7 (finally it was my boon mistake why I stuck, I am embarrassed :-( )

The output of "exiv2 ex [File]" looks same but actually the files are not same, when I diff them

exiv2-0.28.1

$ exiv2 ex 2023-12-29_151301_AG7_9385.NEF
Warning: Exif tag Exif.NikonPreview.JPEGInterchangeFormatLength not encoded
Warning: Exif IFD NikonPreview not encoded
Warning: Exif tag Exif.Photo.MakerNote not encoded
Warning: Exif tag Exif.NikonSi02xx.0x027a not encoded
Warning: Exif tag Exif.Nikon3.0x00bc not encoded

exiv-028_2023-12-29_151301_AG7_9385.exv.zip

exiv2-0.28_current_Pkvt_20240109.txt

exiv2-0.27.7

$ exiv2 ex 2023-12-29_151301_AG7_9385.NEF
Warning: Exif tag Exif.NikonPreview.JPEGInterchangeFormatLength not encoded
Warning: Exif IFD NikonPreview not encoded
Warning: Exif tag Exif.Photo.MakerNote not encoded
Warning: Exif tag Exif.NikonSi02xx.0x027a not encoded
Warning: Exif tag Exif.Nikon3.0x00bc not encoded

exiv-027_2023-12-29_151301_AG7_9385.exv.zip

exiv2-0.27_current_Pkvt_20240112.txt

So if I do a diff between the two Pkvt outputs, I get: (left is old 0.27.7 and right is new 0.28.1 with the problem not to obay ~/.exiv2)

$ diff ~/analysis/exiv2-0.27_current_Pkvt_20240112.txt ~/analysis/exiv2-0.28_current_Pkvt_20240109.txt 
108c108
< Exif.NikonPc.QuickAdjust                      255  n/a
---
> Exif.NikonPc.QuickAdjust                      255  n/v
153c153
< Exif.NikonLd3.LensIDNumber                    226  Tamron SP 70-200mm F/2.8 Di VC USD G2
---
> Exif.NikonLd3.LensIDNumber                    226  226
164c164,189
< Exif.Nikon3.FlashInfo                         48 49 48 55 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  48 49 48 55 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
---
> Exif.NikonFl7.Version                         48 49 48 55  1.07
> Exif.NikonFl7.FlashSource                     0  Keine
> Exif.NikonFl7.ExternalFlashFirmware           0  n/v
> Exif.NikonFl7.ExternalFlashData1              0  External flash off
> Exif.NikonFl7.ExternalFlashData2              0  Aus
> Exif.NikonFl7.FlashCompensationMaster         0  n/v
> Exif.NikonFl7.FlashFocalLength                0  n/v
> Exif.NikonFl7.RepeatingFlashRate              0  n/v
> Exif.NikonFl7.RepeatingFlashCount             0  n/v
> Exif.NikonFl7.FlashGNDistance                 0  n/v
> Exif.NikonFl7.FlashColorFilter                0  Keine
> Exif.NikonFl7.FlashGroupAControlData          0  Aus
> Exif.NikonFl7.FlashGroupBCControlData         0  Aus, Aus
> Exif.NikonFl7.FlashCompensationGroupA         0  n/v
> Exif.NikonFl7.FlashCompensationGroupB         0  n/v
> Exif.NikonFl7.FlashCompensationGroupC         0  n/v
> Exif.NikonFl7.ExternalFlashData3              0  Exposure Comp.: Entire frame
> Exif.NikonFl7.CameraFlashOutput               0  0.0 EV
> Exif.NikonFl7.CameraExposureCompensation      0  0.0 EV
> Exif.NikonFl7.CameraFlashCompensation         0  0.0 EV
> Exif.NikonFl7.ExternalFlashData4              0  Illumination Pat.: Standard
> Exif.NikonFl7.FlashZoomHeadPosition           0  n/v
> Exif.NikonFl7.FlashMasterOutput               0  n/v
> Exif.NikonFl7.FlashGroupAOutput               0  n/v
> Exif.NikonFl7.FlashGroupBOutput               0  n/v
> Exif.NikonFl7.FlashGroupCOutput               0  n/v
183c208
< Exif.NikonAf2.ContrastDetectAFInFocus         0  0
---
> Exif.NikonAf2.ContrastDetectAFInFocus         0  Nein

AxelG-DE avatar Jan 12 '24 09:01 AxelG-DE

Thanks @AxelG-DE for your effort, that's more useful. 👍

However, I can't reproduce locally (w/ 0.28.x branch), using either of your .exv files and this exiv2.ini (I'm on Windows):

[nikon]
226=Foo Bar 3

I get

Exif.NikonLd3.LensIDNumber                    226  Foo Bar 3

kmilos avatar Jan 12 '24 14:01 kmilos

Just a wild guess: perhaps Gentoo maintainers (and other distros having similar issues) forgot to add and enable the inih dependency needed for parsing these config files since 0.28.0?

Edit: Yep. Didn't forget, but not enabled on Gentoo - @douzzer as well, so please file bug there so it's tracked somewhere. @MStraeten your (Canon only?) case might still be different/unrelated I think.

kmilos avatar Jan 12 '24 14:01 kmilos

@kmilos seems you have the right smell

from the ebuild (that controls how a package will be built and installed):

multilib_src_configure() {
        local mycmakeargs=(
                -DEXIV2_BUILD_SAMPLES=NO
                -DEXIV2_ENABLE_BROTLI=OFF
                -DEXIV2_ENABLE_NLS=$(usex nls)
                -DEXIV2_ENABLE_PNG=$(usex png)
                -DEXIV2_ENABLE_CURL=$(usex webready)
                -DEXIV2_ENABLE_INIH=OFF # multilib/libdir logic is broken
                -DEXIV2_ENABLE_WEBREADY=$(usex webready)
                -DEXIV2_ENABLE_XMP=$(usex xmp)
                -DEXIV2_ENABLE_BMFF=$(usex bmff)

AxelG-DE avatar Jan 12 '24 14:01 AxelG-DE

Yep. As requested, let's please not discuss the Gentoo problem here any further but move it to their tracker (as Team Exiv2 has nothing to do with how distros package), and leave this to analysing the remaining issue @MStraeten is seeing.

kmilos avatar Jan 12 '24 14:01 kmilos

@kmilos I have filed an upstream bug https://bugs.gentoo.org/921937

AxelG-DE avatar Jan 12 '24 14:01 AxelG-DE

I can confirm that this bug also affect myself. Is there change that you'll fix this?

ktatar156 avatar Feb 26 '24 14:02 ktatar156

With the config file problem out of the way (although one place I see inih missing still is OpenBSD @ajacoutot), it would appear there is still the occasional (and not easy to reproduce) misdetection left...

@hassec @neheb I'm starting to wonder if this is also maybe related to the switch to std::regex and its different and flaky implementations, as I can't seem to reproduce in my environment (MSYS2 UCRT64 nor CLANG64)?

kmilos avatar Feb 28 '24 10:02 kmilos

I get Unknown Lens from darktable on all my Canon lenses (35-80mm, 18-135mm, 70-300mm) but NOT FOR ALL SHOTS Identification seems to succeed for photos taken with focal lengths on the lower side of the lens range and fail for the upper side. All photos are RAW format but I have one JPEG case too Just took 6 shots with the 35-80mm. For shots at focal lengths 35, 43 and 48mm, the lens was correctly identified as Canon EF 35-80mm f/4-5.6 USM by darktable but got Unknown Lens (193) for shots at 59, 65 and 80mm. The 35-80 is a rather old faithful horse (1992!), but the pattern seems to replicate for the other Canon lenses I own. Shots were done on a Canon 60D (firmware 1.1.2) and imported to darktable 4.6.1 on a Mac There can be no question about corrupt exif data since Canon's Digital Photo Professional 4 correctly identified the lenses on all cases as did Mac's Preview(!) I can provide a couple of "film rolls" where this behaviour can be observed

joaobrisson avatar Mar 25 '24 16:03 joaobrisson

git blame shows https://github.com/Exiv2/exiv2/commit/bdd8a386b5 to be the problem.

neheb avatar Mar 25 '24 22:03 neheb

@joaobrisson please provide example files, then I'll try to have a look if I can find the time.

hassec avatar Mar 26 '24 22:03 hassec

@joaobrisson https://github.com/joaobrisson please provide example files.

gladly need mail address to send 19 raw files totalling 447 MB (wetransfer?) it's 3 series of photos taken with 3 different Canon lenses at focal lengths covering each lens focal length range

joaobrisson avatar Mar 26 '24 23:03 joaobrisson

@joaobrisson would you mind just extracting the exif from your raw files and attaching a zip archive of the *.exv files instead? Those can then also directly be used to extend our test suite. If ok with you, please also state that you share these files under e.g. CC0 or another permissive license such that we are allowed to include them in the tests.

The steps are explained in the creating a test file wiki.

hassec avatar Mar 26 '24 23:03 hassec

@joaobrisson https://github.com/joaobrisson would you mind just extracting the exif from your raw files and attaching a zip archive of the *.exv files instead?

here they are together with a .csv describing the files and lens ID status

joaobrisson avatar Mar 27 '24 11:03 joaobrisson

@joaobrisson you need to attach them to the actual comment on github.com. The email reply doesn't add them.

hassec avatar Mar 27 '24 13:03 hassec

here they are together with a .csv describing the files and lens ID status

exvCanonfiles.zip

joaobrisson avatar Mar 27 '24 15:03 joaobrisson

@joaobrisson thanks for sharing those files.

I just tried to reproduce the problem but using exiv2 0.28.2 I see the following:

❯ exiv2  -pa -g LensType IMG_*.exv
IMG_0001.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 35-80mm f/4-5.6 USM
IMG_0002.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 35-80mm f/4-5.6 USM
IMG_0003.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 35-80mm f/4-5.6 USM
IMG_0004.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 35-80mm f/4-5.6 USM
IMG_0005.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 35-80mm f/4-5.6 USM
IMG_0006.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 35-80mm f/4-5.6 USM
IMG_0007.exv          Exif.CanonCs.LensType                        Short       1  Canon EF-S 18-135mm f/3.5-5.6 IS
IMG_0008.exv          Exif.CanonCs.LensType                        Short       1  Canon EF-S 18-135mm f/3.5-5.6 IS
IMG_0009.exv          Exif.CanonCs.LensType                        Short       1  Canon EF-S 18-135mm f/3.5-5.6 IS
IMG_0010.exv          Exif.CanonCs.LensType                        Short       1  Canon EF-S 18-135mm f/3.5-5.6 IS
IMG_0011.exv          Exif.CanonCs.LensType                        Short       1  Canon EF-S 18-135mm f/3.5-5.6 IS
IMG_0012.exv          Exif.CanonCs.LensType                        Short       1  Canon EF-S 18-135mm f/3.5-5.6 IS
IMG_0013.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM
IMG_0014.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM
IMG_0015.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM
IMG_0016.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM
IMG_0017.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM
IMG_0018.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM
IMG_0019.exv          Exif.CanonCs.LensType                        Short       1  Canon EF 70-300mm f/4-5.6 IS USM

What version of exvi2 and what operating system are you on?

hassec avatar Mar 27 '24 21:03 hassec

Also please see my earlier comment regarding a license:

... If ok with you, please also state that you share these files under e.g. CC0 or another permissive license such that we are allowed to include them in the tests.

hassec avatar Mar 27 '24 22:03 hassec