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
convert svg to jpg, rotation artefacts
Re: convert svg to jpg, rotation artefacts
ImageMagick has two SVG renderer. Type
- identify -list configure
- convert msvg:test.svg res.jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: convert svg to jpg, rotation artefacts
Looks like it may be a problem in IM's call of the RSVG library.
Internal MSVG converter works fine
But no attempt at using the rsvg converter from "convert" has worked.
however using the rsvg commands
also works fine!
Internal MSVG converter works fine
Code: Select all
convert msvg:t.svg show:
however using the rsvg commands
Code: Select all
rsvg-convert t.svg > t.png
convert t.png -background white -flatten show:
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: convert svg to jpg, rotation artefacts
Try this command:
- convert -background none svg_img_ex.svg svg_img_ex.png
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: convert svg to jpg, rotation artefacts
I tried
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
and fixing the image reference link in the SVG
I still get same 'black halo' along edges bug
Code: Select all
convert -background none svg_img_ex.svg -background white -flatten show:
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
I still get same 'black halo' along edges bug
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/