Lychee icon indicating copy to clipboard operation
Lychee copied to clipboard

[Enhancement] Set Reuse License via Metadata

Open Wdavery opened this issue 1 year ago • 3 comments

Maybe I've missed this somehow, but I have a large collection of licensed images that have different and would like to have the Lychee "License" field automatically set via image metadata.

Pulling directly from the standard copyright fields in EXIF, IPTC, or XMP would be appropriate. Start at most "advanced" and fallback if it doesn't exist: xmp-dc:rights > exif:copyright > iptc:copyrightnotice

Wdavery avatar Sep 28 '22 17:09 Wdavery

Is there some standardized format that these copyright notices are expected to follow though? Our metadata extractor currently supports at least IFD0:Copyright and iptc:copyright, but aren't these arbitrary strings? Lychee currently supports a fixed set of licenses instead: https://github.com/LycheeOrg/Lychee/blob/75f949e87471b16997123003617673d55f0dbbf8/app/Assets/Helpers.php#L194-L231

kamil4 avatar Oct 03 '22 20:10 kamil4

Indeed they are arbitrary strings. But the fixed set of licenses is for the chooser only no? There is no functionality built around that fixed set as far I am aware. Is there any reason an arbitrary string can't be displayed if it is set? The Lychee chooser could even trump the metadata if you specify a license.

Wdavery avatar Oct 04 '22 15:10 Wdavery

Good point. We could have a "Custom" entry in the chooser that, when selected, adds a text input field where an arbitrary string can be entered. The license extracted during import/upload would result in a "Custom" setting, unless the string happened to match one of the pre-existing ones...

So yeah, it's conceptually simple to add, though extending the GUI of our web frontend is a fairly tedious work. I'm marking this as a "Project for volunteers", unless another Lychee developer expresses interest...

kamil4 avatar Oct 04 '22 17:10 kamil4