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

Update XMP tags for IPTC 2021.1 #2053

Merged

Conversation

postscript-dev
Copy link
Collaborator

Update tags according to the new IPTC Photo Metadata Standard 2021.1 specification. This includes changes to Exiv2 tags in Xmp.iptc., Xmp.iptcExt., Xmp.Xmp. and Xmp.photoshop..

According to the standard, several tags in Xmp.iptc. and Xmp.iptcExt. had been wrongly added, as they only exist as part of a struct used by a tag. The incorrect tags have been marked as deprecated in the label and description.

Closes #1959

Changes:
1. Add/update tags.
2. According to the standard, several tags in
   `Xmp.iptc.<property>` and `Xmp.iptcExt.<property>`, had been
   wrongly added, as they only exist as part of a struct used by a
   tag. The incorrect tags have been marked as deprecated in the
   label and description.
3. Update existing test with translated output.

Ref: [IPTC Photo Metadata Standard 2021.1](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-2021.1.html)
@postscript-dev postscript-dev added enhancement feature / functionality enhancements prettyPrinter Anything related to the output formatting of a value labels Jan 10, 2022
@postscript-dev postscript-dev added this to the v1.00 milestone Jan 10, 2022
@postscript-dev postscript-dev self-assigned this Jan 10, 2022
@codecov
Copy link

codecov bot commented Jan 10, 2022

Codecov Report

Merging #2053 (da320f3) into main (b0318c3) will decrease coverage by 55.75%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #2053       +/-   ##
==========================================
- Coverage   61.47%   5.72%   -55.76%     
==========================================
  Files          96      96               
  Lines       19195   18955      -240     
  Branches     9841    9843        +2     
==========================================
- Hits        11801    1085    -10716     
- Misses       5080   17682    +12602     
+ Partials     2314     188     -2126     
Impacted Files Coverage Δ
src/properties.cpp 54.71% <ø> (-18.65%) ⬇️
src/tags_int.hpp 0.00% <0.00%> (-93.11%) ⬇️
src/getopt.hpp 0.00% <0.00%> (-100.00%) ⬇️
src/actions.hpp 0.00% <0.00%> (-100.00%) ⬇️
src/exiv2app.hpp 0.00% <0.00%> (-100.00%) ⬇️
src/fujimn_int.cpp 0.00% <0.00%> (-100.00%) ⬇️
src/orfimage_int.hpp 0.00% <0.00%> (-100.00%) ⬇️
src/rw2image_int.hpp 0.00% <0.00%> (-100.00%) ⬇️
include/exiv2/exif.hpp 0.00% <0.00%> (-100.00%) ⬇️
include/exiv2/iptc.hpp 0.00% <0.00%> (-100.00%) ⬇️
... and 81 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0318c3...da320f3. Read the comment docs.

@postscript-dev
Copy link
Collaborator Author

@kevinbackhouse: I think that the codeconv diff is reduced because I added a lot of translation values. I can add a Python test that includes these.

@piponazo piponazo self-requested a review January 10, 2022 21:02
@piponazo
Copy link
Collaborator

What a coincidence. Today I was looking at the IPTC code and I also found out about the new standard. I will join the review process if you do not mind 😉

Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work done here 👏 !

I just added few comments about adding some comments in the code (here & there) so that it makes easier for newcomers to find out where to find more information.

{ "OrganisationInImageCode", N_("Code of featured Organisation"), "bag Text", xmpBag, xmpExternal, N_("Code from controlled vocabulary for identifying the organisation or company which is featured in the image.") },
{ "AddlModelInfo", N_("Additional model information"), "Text", xmpText, xmpExternal, N_("Information about the ethnicity and other facets of the model(s) in a model-released image.") },
{ "OrganisationInImageCode", N_("Code of featured Organisation"), "bag Text", xmpBag, xmpExternal, N_("Code from a controlled vocabulary for identifying the organisation or company which is featured in the image.") },
{ "AboutCvTerm", N_("CV-Term About Image"), "bag CVTerm", xmpBag, xmpExternal, N_("One or more topics, themes or entities the content is about, each one expressed by a term from a Controlled Vocabulary.") },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be AboutCvTerms (with s at the end)?
I noticed that it appears with an s in this link:
https://www.iptc.org/std/photometadata/specification/iptc-pmd-schema_2019.1.1.json

But in https://www.iptc.org/std/photometadata/specification/iptc-pmd-techreference_2021.1.json
I found entries with s and without it.

I am not sure yet how we are translating those specifications to our code structures.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the IPTC 2021.1 specification, I used the XMP Specs name rather than the JSON Specs name. This mapped to the XML files (i.e. .xmp) and seemed like the correct one to use - unless you know differently. It is worth noting that the ExifTool tags also use the XMP Specs name.

After your comment, I looked at the JSON Specs values and lots of the names are different but I don't know why. @bquinn, can you help with this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answer. I just wanted to know how we were doing it 😉

src/properties.cpp Show resolved Hide resolved
src/properties.cpp Show resolved Hide resolved
@clanmills
Copy link
Collaborator

@postscript-dev Peter, I'd also like to express my appreciation and admiration for your work here.

I'm so happy to see Exiv2 moving without me pushing. It was a lot of work in 2020 and 2021 to deal with BMFF, three "dot" releases and to write the book. The effort has been rewarded by you and @kmilos and @alexvanderberkel and @hassec and and @1div0 joining Team Exiv2. And @kevinbackhouse, @piponazo, @neheb and @nehaljwani have continued to make great contributions. Who knows, maybe @D4N will rejoin us. Dan: you know you are welcome.

I really will retire from Exiv2 during 2022. I'd like to keep 0.27-maintenance alive while we move towards the C++XX release of Exiv2. @kevinbackhouse has done such good work on security, I feel it's right that I should support that effort by releasing "dots" when needed.

@nehaljwani I'm very busy this week and next with family matters. I haven't forgotten that I have to give you feedback on the GitHub version of exiv2.org. I will. However I may not be able to do this until 2022-01-24.

@postscript-dev
Copy link
Collaborator Author

@piponazo: Do you know why the codeconv is failing? The EXV_PRINT_VOCABULARY_MULTI() reference should be triggered by printing the Xmp.iptc.Scene tag. As for all the others, I don't know. When I was preparing to submit, it is possible that I may have used git pull upstream main instead of git pull --rebase upstream main. If this is the problem then I can submit a clean version in a new branch.

@piponazo
Copy link
Collaborator

@piponazo: Do you know why the codeconv is failing?

I would not worry too much about the codecov reports. I noticed in the last months/years that the reports are not precise, in fact when I run the code coverage locally with gcovr I obtain better coverage that the one reported by codecov (which seems to be using gcovr too).

I would ignore codecov at the moment. I can check in the future how we are using codecov and try to determine how we can improve the experience with it.

@postscript-dev postscript-dev merged commit 55712d4 into Exiv2:main Jan 13, 2022
@postscript-dev postscript-dev deleted the update_XMP_tags_for_IPTC_2021.1 branch January 13, 2022 10:44
@clanmills clanmills mentioned this pull request Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature / functionality enhancements prettyPrinter Anything related to the output formatting of a value
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New IPTC Photo Metadata Standard properties due to be introduced 20 Oct 2021
3 participants