I converted the SVG from your link sucessfully using this command:
convert \
http://www.fileformat.info/info/unicode/char/00c1/latin_capital_letter_a_with_acute.svg \
latin_capital_letter_a_with_acute.png
Here is the result, which looks OK to me:

My version of ImageMagick is (according to convert -version
):
Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc \
jbig jng jp2 jpeg lcms lqr ltdl lzma openexr \
pangocairo png ps rsvg tiff webp wmf x xml zlib
However, it is not ImageMagick directly and all by itself that does the heavy-lifting of interpreting the SVG. My ImageMagick uses an external delegate to achieve this. How exactly this works can be made visible by adding the -verbose
setting to the command line:
convert -verbose letter_a_with_acute.svg letter_a_with_acute.png
"/opt/local/bin/inkscape" "/var/tmp/magick-12470O5QRRVap0Ub4" \
--export-eps="/var/tmp/magick-124705G1EV-reRRrb" --export-dpi="90,90" \
--export-background="rgb(100%,100%,100%)" --export-background-opacity="1" \
> "/var/tmp/magick-12470W9feuKm0JHUA" 2>&1
/var/tmp/magick-12470qEPdaNM3mKYw1 PNG 155x209 155x209+0+0 8-bit sRGB 3.04KB 0.000u 0:00.000
/var/tmp/magick-124705G1EV-reRRrb PS 155x209 155x209+0+0 16-bit sRGB 3.04KB 0.000u 0:00.000
letter_a_with_acute.svg=>/var/tmp/magick-124705G1EV-reRRrb PS 155x209 155x209+0+0 16-bit sRGB 3.04KB 0.000u 0:00.000
letter_a_with_acute.svg=>latin_capital_letter_a_with_acute.png PS 155x209 155x209+0+0 8-bit sRGB 17c 2.93KB 0.000u 0:00.000
[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT \
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \
"-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \
"-r72x72" -g155x209 "-sOutputFile=/var/tmp/magick-12470qEPdaNM3mKYw%d" \
"-f/var/tmp/magick-12470Xt3b3Qubkxx2" \
"-f/var/tmp/magick-12470VRcUz0MbmdiC"
As you can clearly see, convert
employs two delegates in two different steps to bring about the conversion:
First, it runs an inkscape
command. This command exports the SVG to EPS.
Second, it runs a Ghostscript command. This command converts the EPS from step 1 to the final PNG.
In between the above two steps, it runs some other command, probably identify
, in order to find out the dimensions of the EPS that was produced.
In other words, if you are not able to set up your ImageMagick delegates correctly so that they will process SVG files for you, you could always use Inkscape directly on the command line to create the PNG:
inkscape \
--without-gui \
--export-png=out.png \
--export-dpi="90,90" \
--export-background="rgb(100%,100%,100%)" \
--export-background-opacity="1" \
input.svg
Looking at the result, out.png
, it seems like it may be using too much white space around the letter:
identify out.png
out.png PNG 744x1052 744x1052+0+0 8-bit sRGB 13.1KB 0.000u 0:00.000
This can be rectified by ImageMagick:
convert out.png -trim +repage trimmed.png
Check:
identify trimmed.png
trimmed.png PNG 193x260 193x260+0+0 8-bit sRGB 256c 3.53KB 0.000u 0:00.000