Colorizing by convert with gradient fails - version problem?
Posted: 2014-09-05T05:42:20-07:00
Hi,
if been running a script on a php5 linux server (old Ubuntu 10.04 LTS) with an imagemagick version of:
Now I recently moved the script on another server with this version:
The whole setup is quite unchanged.
I do a call on the imagemagick functions by php's exec() like this:
$hexr=sprintf("%02X",($clr_d['r']));
$hexg=sprintf("%02X",($clr_d['g']));
$hexb=sprintf("%02X",($clr_d['b']));
$ex="convert -size 1x6 gradient:'#".$hexr.$hexg.$hexb."'-'#".$hexr.$hexg.$hexb."' ".$sym_dir."colornow.png";
exec($ex,$out);
$ex="convert ".$sym_dir.$v2_links."_links.png ".$sym_dir."colornow.png -clut ".$sym_dir."tmp.png";
exec ($ex,$out);
The script works as "colorizer" for a symbol which is then merged with a picture.
It worked flawlessly until moving the whole thing on the new server.Now, the color is _always_ purple - which is... unwanted at best
Values in variables are the same, only thing I can think of is some change with the versions? If not, I stand corrected, but I'm out of options after trying to fix this thing for many hours now
Kind regards,
Peter
if been running a script on a php5 linux server (old Ubuntu 10.04 LTS) with an imagemagick version of:
Code: Select all
Version: ImageMagick 6.5.7-8 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP
Code: Select all
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
I do a call on the imagemagick functions by php's exec() like this:
$hexr=sprintf("%02X",($clr_d['r']));
$hexg=sprintf("%02X",($clr_d['g']));
$hexb=sprintf("%02X",($clr_d['b']));
$ex="convert -size 1x6 gradient:'#".$hexr.$hexg.$hexb."'-'#".$hexr.$hexg.$hexb."' ".$sym_dir."colornow.png";
exec($ex,$out);
$ex="convert ".$sym_dir.$v2_links."_links.png ".$sym_dir."colornow.png -clut ".$sym_dir."tmp.png";
exec ($ex,$out);
The script works as "colorizer" for a symbol which is then merged with a picture.
It worked flawlessly until moving the whole thing on the new server.Now, the color is _always_ purple - which is... unwanted at best
Values in variables are the same, only thing I can think of is some change with the versions? If not, I stand corrected, but I'm out of options after trying to fix this thing for many hours now
Kind regards,
Peter