lovell / lovell/sharp

Enhancement: add/update XMP and IPTC metadata

Open
#4,143 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
32.7k
Forks
1.4k
Avg merge
1d 14h
Merged PRs (30d)
5

Description

Question about an existing feature

I saw that there are a lot of functions that help with changing metadata, I've also checked the tests but what I am interested is in https://github.dev/lovell/sharp/blob/eab7dc1b4942038fd824747c10b4b9eda60ca72e/src/metadata.cc#L119 and https://github.dev/lovell/sharp/blob/eab7dc1b4942038fd824747c10b4b9eda60ca72e/src/metadata.cc#L111

For example, I need to write the xmp:plus:DataMining tag as well as other IPTC tags like the WebstatementURL. How do I write these tags? Which IFD do they belong to?

I also checked the libvips docs and found that this https://www.libvips.org/API/current/libvips-header.html#vips-image-set is used to write the data based on these parts https://www.libvips.org/API/current/libvips-header.html#VIPS_META_XMP_NAME.

Currently, I use the Exiftool to write and share to process, which is quite slow for many images.

XMP:PLUS tags as described here https://exiftool.org/TagNames/PLUS.html#XMP

I would really like to understand how this can be done in sharp directly.

Thank you for the time reading and hopefully answering.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked src/metadata.cc locations and the libvips vips-image-set documentation. Determine how XMP and IPTC tags such as xmp:plus:DataMining and WebstatementURL are represented and whether sharp exposes a supported path for them. Use the existing metadata tests mentioned in the issue to define coverage for the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.