Imagemagick loses gradient on image on Ubuntu

2019-05-31 06:48发布

I am using Ubuntu 11.10. I have installed ImageMagick from the latest source package. Here is the output from "convert -version"

Version: ImageMagick 6.7.6-6 2012-04-19 Q16 http: // www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP 

I am trying to convert an svg into a png which works great unless I have a gradient on some part of the image.

Here is the command I am running:

convert RedPoweredByPenguins.svg redpenguin.png

Here is the SVG: http://gamepsychos.com/penguinCheckers/redPenguin.svg

And here is the png it creates: http://gamepsychos.com/penguinCheckers/redpenguinfail.png

When I run this same command on Fedora 16, I don't lose the gradient. I think maybe one of the libraries ImageMagick uses is not the same but I'm not sure. Anyone have any ideas?

The version output on the working system is:

Version: ImageMagick 6.7.6-6 2012-04-19 Q16 http: //www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP   

2条回答
Deceive 欺骗
2楼-- · 2019-05-31 06:56

After some additional research, I found that the SVG delegate that the "faulty" machine was not using the same as the one on the working machine.

To correct this, I installed rsvg.

apt-get install librsvg2-bin

Then I change ImageMagick's configuration to use rsvg rather than the default delegate.

查看更多
我只想做你的唯一
3楼-- · 2019-05-31 07:18

I just got exactly the same as your "faulty" output on my Mac, with this ImageMagick:

Version: ImageMagick 6.7.6-0 2012-03-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP OpenCL   

So, I think the SVG file is incorrect. Try validating it?

查看更多
登录 后发表回答