openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
18 stars 16 forks source link

Should our image tools support SVG? #113

Open rgaudin opened 9 months ago

rgaudin commented 9 months ago

Our image functions all assume bitmap input or output. Should we support vector formats as well (SVG's the only open and widespread one I think)? If so, should it be using different API or should this be handled transparently?

holta commented 9 months ago

Browsers support SVG 1.1: https://caniuse.com/svg

SVG 2 does not yet seem to be supported by browsers: https://svgwg.org/svg2-draft/

Never easy to align with "all" browsers... but if attainable... Awesome!

kelson42 commented 8 months ago

Would nice indeed, but maybe we can wait the first use case to do it.

benoit74 commented 1 month ago

It is quite common with zimit website to have a favicon in SVG format. This fails to be processed currently.

kelson42 commented 1 month ago

We should go to have a smooth conversion to the expected ZIM Illustration PNG format. For the rest, like written by @holta, we have meanwhile a broad SVG format and we should not force a bitmap conversion.