Re: SVG to PNG

Bob Friesenhahn <[email protected]> Mon, 9 Nov 2020 08:20:10 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Mon, 9 Nov 2020, Pro Turm wrote:

> Does Graphicsmagick support a flawless conversion from SVG to PNG ?

It does a good job with many SVGs, but not with some others.  Notice 
that there is no warranty. You are responsible for the results (good 
or bad).

One thing that GraphicsMagick definitely does not do is to download 
font files via a url from the "web" (e.g. the popular Google fonts).

There is not currently https download support for downloading 
referenced content via https urls (only http is supported).

> I have to decide which package is most suitable for this issue.
>
> So far, Ive observed people using inkscape, librsvg etc.

Inkscape uses a modified/extended SVG format as its native format. 
If the SVG was written by Inkscape (popular under Linux), then no 
program will do better at rendering its SVG than Inkscape.

ImageMagick often depends on librsvg for its SVG rendering.

I have been working for many years to make the MVG rendering code 
(inherited from ImageMagick) in GraphicsMagick more robust. 
GraphicsMagick translates SVG into its own simplified MVG rendering 
requests prior to rendering.  MVG is included in the oss-fuzz testing 
and issues discovered by oss-fuzz have informed my efforts. 
Previously there was fuzz testing performed at the SVG level.

At this time, SVG support is suitable for trusted files, but the 
renderer is not designed to be used on untrusted files behind a 
firewall.

This past weekend, I observed faster rendering performance with 
GraphicsMagick's SVG renderer than I was observing with 
ImageMagick+librsvg.

We could use a capable volunteer to help maintain the SVG rendering 
support and particularly for improving support for SVG 1.1 and adding 
a few missing features such as support for radial gradients.  The SVG 
gradients have become very powerful and GraphicsMagick does not yet 
support the new capabilities.

The GraphicsMagick delegates subsystem can support using an external 
SVG renderer if the user desires that.  It is not necessary to abandon 
GraphicsMagick in order to use a different renderer.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt