Page 1 of 1

question about converting SVG IM 6.9.10.17 Q16 Mac OXS Sierra

Posted: 2018-12-19T14:50:56-07:00
by fmw42
Examining the wizard.svg (http://www.fmwconcepts.com/misc_tests/wizard.svg) , it has the following properties

Geometry: 940x1250+0+0
Resolution: 37.8x37.8
Print size: 24.8677x33.0688
Units: PixelsPerCentimeter

If I do the multiplication, 37.8 * 33.0688 = 1250 px

But if I do

Code: Select all

convert -units PixelsPerCentimeter -density 37.8 wizard.svg wizard.png
The resulting size is only 370x492

Why is it not 940x1250?

The above was using Inkscape. So is this a bug in Inkscape or ImageMagick


I also get the same output size if using JPG and if using units of pixelsperinch. All 3 of these produce the same output dimensions though different densities.


convert -units PixelsPerCentimeter -density 37.8 MSVG:wizard.svg tmp1.png

convert -units PixelsPerInch -density 37.8 MSVG:wizard.svg tmp2.png

convert -units PixelsPerCentimeter -density 37.8 MSVG:wizard.svg tmp1.jpg

Re: question about converting SVG IM 6.9.10.17 Q16 Mac OXS Sierra

Posted: 2018-12-19T18:37:50-07:00
by fmw42
OK. I think I have this partially resolve. The issue is that identify -verbose using Inkscape shows:

Geometry: 940x1250+0+0
Resolution: 37.8x37.8
Print size: 24.8677x33.0688
Units: PixelsPerCentimeter


Whereas using MSVG shows:

Geometry: 940x1250+0+0
Units: Undefined

which lists no Resolution and Units undefined.

Convert as follows with MSVG, is consistent assuming density of 96 and units of pixelsperinch.

Code: Select all

convert -units PixelsPerInch -density 96 MSVG:wizard.svg tmp1.jpg
Produces an image of dimensions 940x12500.