.svg problems

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
weeks

.svg problems

Post 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>
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg problems

Post 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.
weeks

Re: .svg problems

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: .svg problems

Post by magick »

Have you tried:
  • convert -density 8 image.svg image.bmp

We get decent looking results.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: .svg problems

Post by anthony »

Or

Code: Select all

convert image.svg -resize 44x44 image.bmp
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply