Page 1 of 1

.svg problems

Posted: 2009-01-23T13:40:55-07:00
by weeks
Hi,

I am trying to convert a .svg image to a .bmp image of the same name. Using the command "convert -size 44 file.svg file.bmp" doesn't do a very good job, even using the +antialias option does not preserve the image integrity or quality. Using the command "convert -density 7.2 + antialias file.svg file.bmp" produces better results. The .svg file is not complex, am I just using the wrong command? or missing an option? This is an example of the type of .svg file I am trying to convert. Any help is appreciated.

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!-- SVG content generated using Symbology Configuration Management System (SCMS) -->
<!-- Systematic Software Engineering Ltd. - www.systematic.co.uk - do not remove  -->
<svg id="SUAP-----------" width="400px" height="400px" viewBox="0 0 400 400">
<g >
<svg viewBox="0 0 400 400" id="_0.SUA------------" width="400px" height="400px"><path d="M285 320 C410 320 410 115 285 115 C285 -24 115 -24 115 115 C-10 115 -10 320 115 320" style="fill:rgb(255,255,128);stroke:rgb(0,0,0);stroke-width:10"></path>
</svg>

</g>
</svg>

Re: .svg problems

Posted: 2009-01-23T13:48:16-07:00
by magick
Post the resulting image here. We use
  • convert file.svg file.bmp
and get a fine looking result. We're using ImageMagick 6.4.8-8.

Re: .svg problems

Posted: 2009-01-23T19:38:32-07:00
by weeks
The problem is the .svg 400X400 file from as seen above needs to be resized to a 44X44 .bmp, when this is done the image gets distorted and is not a clean .bmp file. If I bring the .svg file into Gimp and resize on import as 44X44 and save as bitmap I get the result I want a clean undistorted bitmap, however i have hundreds of images to transform so Image Magick is what I want to use with a script however it is not giving me the desired result.

Re: .svg problems

Posted: 2009-01-23T20:32:28-07:00
by magick
Have you tried:
  • convert -density 8 image.svg image.bmp

We get decent looking results.

Re: .svg problems

Posted: 2009-01-28T18:12:31-07:00
by anthony
Or

Code: Select all

convert image.svg -resize 44x44 image.bmp