Issue
I'm doing this, in order to convert a.svg
to a.png
:
$ convert -verbose -density 300 -quality 100 -colorspace RGB a.svg a.png
'inkscape' '/tmp/magick-IzF5R-f12XvI7X-ColE5CglRNjuNMCrr' --export-filename='/tmp/magick--fW_TQpKspQREgCh_JyXTXv2RxaOzSe4.png' --export-dpi='300' --export-background='rgb(100%,100%,100%)' --export-background-opacity='0.99999999999900002212' > '/tmp/magick-VwBlgvqIBVn1FHewJTz4M92i32xg38RA' 2>&1
mvg:/tmp/magick-36-3BbMBCBFnYGZ_ErYqD-XBUzUAlJ6j=>/tmp/magick-36-3BbMBCBFnYGZ_ErYqD-XBUzUAlJ6j MVG 1687x1775 1687x1775+0+0 16-bit sRGB 192732B 0.120u 0:00.089
a.svg SVG 1687x1775 1687x1775+0+0 16-bit sRGB 192732B 0.000u 0:00.001
a.svg=>a.png SVG 1687x1775 1687x1775+0+0 8-bit RGB 1c 1710B 0.480u 0:00.137
The file I'm getting is a blank PNG (totally white, nothing inside). However, on other machines (macOS and Ubuntu), the generated image is correct. On GitHub Actions Ubuntu 22.04 I'm getting the blank one.
This is what I'm getting on all machines:
$ convert --version
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
Any ideas?
Solution
Do you have Inkscape on both machines and the same versions? Note that Imagemagick can use any one of 3 SVG renderers: Inkscape, RSVG delegate or the internal IM MSVG renderer, in order of decreasing capability. So there may be features in your SVG file that only Inkscape can process properly. So be sure you have installed Inkscape on each system and try again.
Answered By - fmw42 Answer Checked By - Pedro (WPSolving Volunteer)