Page 1 of 1

Antialias and density not working for svg files

Posted: 2014-09-14T10:16:25-07:00
by OstCollector
I'm trying to convert some SVG files to PNG.
And found -density option not working.

command line following viewtopic.php?f=1&t=11168

Original SVG:
http://realtimeweather.info/numerical/gfs/svg.svg

Convert to PNG with 144dpi:

Code: Select all

convert +antialias -density 144 svg.svg 144.png
http://realtimeweather.info/numerical/gfs/144.png

Convert to PNG with 288dpi:

Code: Select all

convert +antialias -density 288 svg.svg 288.png
http://realtimeweather.info/numerical/gfs/288.png


OS: Gentoo Linux

The imagemagick version is 6.8.9.7, build by portage
configured with:

Code: Select all

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-silent-rules --disable-dependency-tracking --disable-static --disable-hdri --disable-opencl --with-threads --with-modules --with-quantum-depth=16 --with-magick-plus-plus --without-perl --with-perl-options=INSTALLDIRS=vendor --with-gs-font-dir=/usr/share/fonts/urw-fonts --with-bzlib --without-x --with-zlib --without-autotrace --with-dps --without-djvu --with-dejavu-font-dir=/usr/share/fonts/dejavu --without-fftw --without-fpx --without-fontconfig --with-freetype --with-gslib --without-gvc --without-jbig --with-jpeg --with-openjp2 --without-lcms --without-lcms2 --without-lqr --without-lzma --without-openexr --without-pango --with-png --with-rsvg --with-tiff --without-webp --without-windows-font-dir --without-wmf --without-xml --disable-openmp
The librsvg version is 2.40.2, build by portage
configured with

Code: Select all

/var/tmp/portage/gnome-base/librsvg-2.40.2-r1/work/librsvg-2.40.2/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-silent-rules --disable-dependency-tracking --docdir=/usr/share/doc/librsvg-2.40.2-r1 --disable-maintainer-mode --disable-gtk-doc --disable-static --disable-tools --disable-introspection --without-gtk3 --disable-vala --enable-pixbuf-loader

Re: Antialias and density not working for svg files

Posted: 2014-09-14T10:35:42-07:00
by snibgo
Rule of thumb: if RSVG doesn't do what you want, try Inkscape.

Density works fine with your SVG, when Inkscape is the delegate.

Re: Antialias and density not working for svg files

Posted: 2014-09-14T10:55:17-07:00
by fmw42
In general, -density has worked fine for me with RSVG. I am not sure antialiasing is an viable argument with SVG files. If it is, it probably needs to be put after the input file, whereas -density needs to be before the file.