Imagemagick loses gradient on image on Ubuntu

怎甘沉沦 提交于 2019-12-08 04:39:07

问题


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   

回答1:


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.




回答2:


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?



来源:https://stackoverflow.com/questions/10235426/imagemagick-loses-gradient-on-image-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!