Ship PNG renditions of the EU icons for image toolkits and FFmpeg
Problem/motivation
The 12 EU icons ship as SVG. GD cannot read SVG. ImageMagick needs an SVG delegate, and its output depends on the install. The FFmpeg overlay filter needs a raster image. A burned-in label should use the official artwork at a known size on every host.
Proposed resolution
- Add PNG renditions at 240, 480 and 960 px wide for each icon and variant (36 files) under
assets/icons/png/. - Keep the script that generates them in the repo, so they can be rebuilt if the Commission updates the icons.
- Add
DisclosureIcons::rasterPath(string $icon, string $variant, int $width): string, returning the smallest rendition at least$widthwide.
Both toolkits then draw the same pixels, and FFmpeg uses the same files.
Remaining tasks
- Generate the PNGs and add the script
-
rasterPath()with a unit test - Note in
assets/icons/README.md
User interface changes
None.
API changes
New method DisclosureIcons::rasterPath().
Data model changes
None.
Part of #56 (closed).
Edited by Giorgio Alfredo Pagano