Add an ai_disclosure_image submodule: burn the EU icon into image style derivatives
Problem/motivation
The overlay (#61 (closed)) exists only in our HTML. Social previews (og:image), RSS, JSON:API, downloads and copies of the file lose it. The Code asks the deployer to take "the distribution and dissemination chain" into account (Measure 1.2.1(c)), and the icon has to survive screenshots and clipped fragments.
Proposed resolution
A submodule ai_disclosure_image, depending on image and image_effects, with an image effect ai_disclosure_label added as the last effect of a style:
- It resolves the source file through #57 (closed) (
ImageInterface::getSource()is the original). When no label is required it does nothing, so one style serves every file. - It draws the icon through the
watermarktoolkit operation of image_effects, which has GD and ImageMagick implementations. Tested on both in DDEV with the same result. - Settings: size as a share of the short edge (default 22% for the pill icons), margin (3%), minimum short edge (240 px; below that the overlay labels the image), variant (auto by corner luminance, black or white).
- Icons from #58 (closed).
- Deep fakes only. Evidently artistic works get no burn-in.
Open question: add the effect to existing styles on install, or leave it to site builders with a status report hint?
Remaining tasks
- Submodule, effect plugin and config schema
- Auto variant: sample the corner luminance before drawing
- Kernel tests on GD and ImageMagick: icon pixels in the corner for a deep fake, an untouched derivative otherwise
- Docs
User interface changes
A new image effect, "AI disclosure label".
API changes
None.
Data model changes
None.
Part of #56 (closed).
Edited by Giorgio Alfredo Pagano