Page MenuHomePhabricator

We should extract Iptc4xmpExt:DigitalSourceType from image metadata
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

In XMP metadata there is a field Iptc4xmpExt:DigitalSourceType. This field signifies the type of source of the image (from the list at https://cv.iptc.org/newscodes/digitalsourcetype/ e.g. Is it from a scanned negative, a screenshot, etc). Of particular note this is a way to signify that the image is AI generated.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • Help people know the source type of an image.

Benefits (why should this be implemented?):

We already extract XMP metadata, so it seems low effort to add this. Downside is its unclear how much this is used in the wild. C2PA (T387075) is much more common, however that's an entirely different metadata format which would be a fair bit of work to add. We could do the IPTC property relatively easily. Certainly couldn't hurt.

For reference, test image: https://iptc.org/std/photometadata/examples/IPTC-PhotometadataRef-Std2024.1.jpg https://www.iptc.org/std/photometadata/documentation/userguide/images/generative-ai-example.jpg

Event Timeline

Change #1190371 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/libs/XMPReader@master] Add DigitalSourceType field to the extraction list

https://gerrit.wikimedia.org/r/1190371

Change #1190397 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/core@master] Add support for displaying DigitalSourceType image metadata

https://gerrit.wikimedia.org/r/1190397

I was a bit unsure on what the best i18n message for digitalSourceType is. I went with "Source of digital media", but potentially that could be misinterpreted as who provided the media or where it came from, where this field is the mechanism that was used for creating the digital file. https://www.iptc.org/std/photometadata/documentation/userguide/#_guidance_for_using_digital_source_type is the official docs on the field.

Some other possibilities:

  • Digitization method
  • Method of creation of digital file

Change #1190371 merged by jenkins-bot:

[mediawiki/libs/XMPReader@master] Add DigitalSourceType field to the extraction list

https://gerrit.wikimedia.org/r/1190371

@Bawolff Shall I make a release of XMPReader, or do you have some other patches in progress?

Change #1190397 merged by jenkins-bot:

[mediawiki/core@master] Add support for displaying DigitalSourceType image metadata

https://gerrit.wikimedia.org/r/1190397

@Bawolff Shall I make a release of XMPReader, or do you have some other patches in progress?

I have one more patch in progress to add some additional tests, but it would just be a tests patch

I also wanted to look in to seeing if xmpreader can easily be extended to read the metadata in svg (T405161). However that might be a bigger change and it probably makes sense to do a separate release before that.

Change #1191811 had a related patch set uploaded (by Bartosz Dziewoński; author: Brian Wolff):

[mediawiki/core@master] Bump wikimedia/xmp-reader to 0.10.1

https://gerrit.wikimedia.org/r/1191811

Change #1191811 merged by jenkins-bot:

[mediawiki/core@master] Bump wikimedia/xmp-reader to 0.10.1

https://gerrit.wikimedia.org/r/1191811

matmarex assigned this task to Bawolff.