Page 1 of 1

Re: convert svg to jpg, rotation artefacts

Posted: 2009-06-15T15:59:54-07:00
by fmw42
try setting the -virtual-pixel to white. see http://www.imagemagick.org/Usage/distorts/affine/


you can also try using -distort SRT to do the transform with rotation and xscale and yscale.

see http://www.imagemagick.org/Usage/distorts/#srt

you can also change the interpolation to have more or less smoothing/antialiasing

and you can control the virtual-pixel setting for the edge interpolation

Re: convert svg to jpg, rotation artefacts

Posted: 2009-06-15T16:10:29-07:00
by magick
ImageMagick has two SVG renderer. Type
  • identify -list configure
Is rsvg associated with the DELEGATES tag? To use the internal renderer use this command:
  • convert msvg:test.svg res.jpg
The conversion worked fine for us (no outline). We're using ImageMagick 6.5.3-7.

Re: convert svg to jpg, rotation artefacts

Posted: 2009-06-15T20:47:35-07:00
by anthony
Looks like it may be a problem in IM's call of the RSVG library.

Internal MSVG converter works fine

Code: Select all

   convert msvg:t.svg show:
But no attempt at using the rsvg converter from "convert" has worked.

however using the rsvg commands

Code: Select all

  rsvg-convert t.svg > t.png
  convert t.png -background white -flatten show:
also works fine!

Re: convert svg to jpg, rotation artefacts

Posted: 2009-06-16T04:44:43-07:00
by magick
Try this command:
  • convert -background none svg_img_ex.svg svg_img_ex.png

Re: convert svg to jpg, rotation artefacts

Posted: 2009-06-16T19:58:29-07:00
by anthony
I tried

Code: Select all

convert -background none svg_img_ex.svg  -background white -flatten show:
And I still get the 'black halo' bug along the edges, that the user is complaining about.
I do not get that using the rsvg-convert command.

Note the image in the SVG is svg_img_ex.gif.jpeg that is a jpeg image.

After converting the JPEG to GIF

Code: Select all

  convert svg_img_ex.gif.jpeg  -matte svg_img_ex.gif
and fixing the image reference link in the SVG
I still get same 'black halo' along edges bug