How to convert svg to png successfully with rsvg-convert?

2.7k views Asked by At

I am trying to convert an svg file to a png using rsvg-convert from the librsvg library. The conversion completes but the resultant image is blank.

I'm using the following svg as my input: https://www.dropbox.com/s/57mxtqf5ausoope/squiggle.svg?dl=0

The rsvg-convert binary: https://github.com/serverlesspub/rsvg-convert-aws-lambda-binary/tree/master/vendor

Running on VM running Amazon Linux 2. I've also tried locally on my Ubuntu subsystem running under Windows 10.

rsvg-convert input.svg -o output.png

The resultant image is black, I would like to have the drawing to be output and the background to be transparent.

1

There are 1 answers

0
Federico Mena-Quintero On

Your version of rsvg-convert is too old. Please use 2.44.x; this is where support for hsl colors was introduced.