convert function not taking gradient color

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gurupak
Posts: 2
Joined: 2014-03-04T08:40:07-07:00
Authentication code: 6789

convert function not taking gradient color

Post 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,
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert function not taking gradient color

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert function not taking gradient color

Post 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
gurupak
Posts: 2
Joined: 2014-03-04T08:40:07-07:00
Authentication code: 6789

Re: convert function not taking gradient color

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert function not taking gradient color

Post 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
Post Reply