Page 1 of 1

convert function not taking gradient color

Posted: 2014-03-04T08:50:07-07:00
by gurupak
Hi,

I have transferred my site to a new server and installed the latest version of ImageMagick on it (convert --version 6.2.8 ).

After porting site to new server my ImageMagick commands have stopped running on it. Here is the command that i am using from PHP script:

/usr/bin/convert -size 656x153 xc:none -fill 'gradient:#FDFCFC-#E8EAEB' -draw 'roundRectangle 0,0 656,153 15,15' front_plate_1393946806922887979.png

This command was running without any error on old server.

On new server this is the error I am getting now:

[root@localhost httpdocs]# /usr/bin/convert -size 656x153 xc:none -fill 'gradient:#FDFCFC-#E8EAEB' -draw 'roundRectangle 0,0 656,153 15,15' front_plate_1393946806922887979.png
convert: unrecognized color `gradient:#FDFCFC-#E8EAEB'.
Can you please guide me what has gone wrong here now?

Need your help in this regards,
Best regards,

Re: convert function not taking gradient color

Posted: 2014-03-04T09:42:21-07:00
by Bonzo
latest version of ImageMagick
That might be the latest version available using cpanel but it is a very old version; the latest version as of today is 6.8.8-7

I would guess your old server had a newer version than your new server.

Re: convert function not taking gradient color

Posted: 2014-03-04T11:59:54-07:00
by fmw42
try moving the quotes

/usr/bin/convert -size 656x153 xc:none -fill gradient:"#FDFCFC-#E8EAEB" -draw 'roundRectangle 0,0 656,153 15,15' front_plate_1393946806922887979.png

Re: convert function not taking gradient color

Posted: 2014-03-05T00:42:46-07:00
by gurupak
fmw42 wrote:try moving the quotes

/usr/bin/convert -size 656x153 xc:none -fill gradient:"#FDFCFC-#E8EAEB" -draw 'roundRectangle 0,0 656,153 15,15' front_plate_1393946806922887979.png

I have already checked it by removing quotes. But nothing.

That might be the latest version available using cpanel but it is a very old version; the latest version as of today is 6.8.8-7
I used the Yum Package manager to install it. This could be the issue.

I downloaded the rpm from ImageMagick site as well, but when i ran the rpm, it gives me dependencies issues. Is this viable to install these dependencies from Yum or should i download them separately to avoid older version installed on it.
libHalf.so.4()(64bit) is needed by ImageMagick-6.8.8-7.x86_64
libIex.so.4()(64bit) is needed by ImageMagick-6.8.8-7.x86_64
libIlmImf.so.4()(64bit) is needed by ImageMagick-6.8.8-7.x86_64
libImath.so.4()(64bit) is needed by ImageMagick-6.8.8-7.x86_64
libfftw3.so.3()(64bit) is needed by ImageMagick-6.8.8-7.x86_64
libfpx.so.1()(64bit) is needed by ImageMagick-6.8.8-7.x86_64
libwebp.so.4()(64bit) is needed by ImageMagick-6.8.8-7.x86_64


Please advise.

Re: convert function not taking gradient color

Posted: 2014-03-05T11:02:13-07:00
by fmw42
/usr/bin/convert -size 656x153 xc:none -fill gradient:"#FDFCFC-#E8EAEB" -draw 'roundRectangle 0,0 656,153 15,15' front_plate_1393946806922887979.png
Do not remove the quotes. Just put them around the gradient: argument as above