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

duplicate TagInfo entries in fujimn_int.cpp #2409

Closed
norbertwg opened this issue Nov 2, 2022 · 6 comments
Closed

duplicate TagInfo entries in fujimn_int.cpp #2409

norbertwg opened this issue Nov 2, 2022 · 6 comments
Labels
bug makerNote Anything related to one of the various supported MakerNote formats samples TeamExiv2
Milestone

Comments

@norbertwg
Copy link
Contributor

Running taglist ALL and analysing the output I detected several duplicate entries for Fujifilm. They are not only duplicate key names (like I also found), the complete TagInfo definition is duplicate. The duplicates appeared with Merge remote-tracking branch 'origin'.

As far as I can see, the duplicates have no negative impact on functionality. It seems just to be a duplication of code by mistake. When iterating starting with
const Exiv2::TagInfo* ti = Exiv2::Internal::tagList(ifdId);
no duplicates appear. In taglist.cpp the logic is different and then we get these duplicates.

@VJSchneid : Do you know, if the duplicates are intentionally or by mistake?

As I spent already some time to investigate this, I offer to create a pull request in case it is confirmed, that the duplicates should be removed.

Here the list of duplicates:
0x1001 Fujifilm.Sharpness
0x1002 Fujifilm.WhiteBalance
0x1003 Fujifilm.Color
0x1004 Fujifilm.Tone
0x1010 Fujifilm.FlashMode
0x1011 Fujifilm.FlashStrength
0x1020 Fujifilm.Macro
0x1021 Fujifilm.FocusMode
0x1030 Fujifilm.SlowSync
0x1031 Fujifilm.PictureMode
0x1040 Fujifilm.ShadowTone
0x1041 Fujifilm.HighlightTone
0x104d Fujifilm.CropMode
0x1100 Fujifilm.Continuous
0x1101 Fujifilm.SequenceNumber
0x1200 Fujifilm.0x1200
0x1210 Fujifilm.FinePixColor
0x1300 Fujifilm.BlurWarning
0x1301 Fujifilm.FocusWarning
0x1302 Fujifilm.ExposureWarning
0x1400 Fujifilm.DynamicRange
0x1401 Fujifilm.FilmMode
0x1402 Fujifilm.DynamicRangeSetting
0x1403 Fujifilm.DevelopmentDynamicRange
0x1404 Fujifilm.MinFocalLength
0x1405 Fujifilm.MaxFocalLength
0x1406 Fujifilm.MaxApertureAtMinFocal
0x1407 Fujifilm.MaxApertureAtMaxFocal
0x1431 Fujifilm.Rating
0x1443 Fujifilm.DRangePriority
0x1444 Fujifilm.DRangePriorityFixed
0x1445 Fujifilm.DRangePriorityAuto
0x8000 Fujifilm.FileSource
0x8002 Fujifilm.OrderNumber
0x8003 Fujifilm.FrameNumber
0xf000 Fujifilm.FujiIFD
0xf001 Fujifilm.RawImageFullWidth

@postscript-dev
Copy link
Collaborator

@norbertwg
Thanks for reporting this. The duplicates tags only exist in the main branch.

Within a tag group, if the duplicate keys both use the same tag number, I don't expect any problems when reading/writing. In #2323, I found that we had duplicates which had the same key but different tag numbers. In that case, only the first matching key in the list was available. I resolved the problem by renaming the duplicate keys.

It is possible that the duplicate Fujifilm tags will still cause problems when Building Exiv2 Tag Webpages. I have tried generating the pages and the duplicates were present in the Fujifilm page. I don't know if the final website scripts in https://github.com/Exiv2/team/tree/main/website purge duplicates.

I think that it is better to remove the duplicates and both "0x1200" entries as the unknown tags are automatically added. If you feel you want to, you could also rename/update the "0x1022" and "0x1032" tags using data from https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/FujiFilm.pm . However this is optional.

@postscript-dev postscript-dev added bug TeamExiv2 samples makerNote Anything related to one of the various supported MakerNote formats labels Nov 2, 2022
@postscript-dev postscript-dev added this to the v1.00 milestone Nov 2, 2022
@norbertwg
Copy link
Contributor Author

I will work on removing duplicates and try to rename/update "0x1022" and "0x1032".

@VJSchneid
Copy link
Contributor

Hi @norbertwg,
thanks for reporting that problem! I checked fujifilm_int.cpp and it seems that I missed these duplicate entries when I was doing the merge. The duplicate entries can simply be removed... Sorry for the inconvenience! Do you want to create a pull request or should I create one?

@norbertwg
Copy link
Contributor Author

Hi @VJSchneid ,
I started to work on the pull request today and hope to finish tomorrow.

@VJSchneid
Copy link
Contributor

VJSchneid commented Nov 3, 2022

Okay, if you need any help, let me know.

@norbertwg
Copy link
Contributor Author

Pull request #2412 is created.

@postscript-dev : the unknown tags "0x1022" and "0x1032" were described, so I could just delete their lines without additonal work. I checked https://github.com/Exiv2/team/tree/main/website, but "0x1200" was not listed there. So I deleted it.

@VJSchneid : would you like to review the pull request?

As pull request is created, I close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug makerNote Anything related to one of the various supported MakerNote formats samples TeamExiv2
Projects
None yet
Development

No branches or pull requests

3 participants