Page 3 of 5

Re: Gif Image is not animated after making watermark

Posted: 2014-02-19T23:47:35-07:00
by psanjib
sorry the animation.gif is not server

but if i used this code

Code: Select all

<?php exec("/usr/bin/convert h8Hjm.gif tmp.gif",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>
the tmp.gif is created in sever

please suggest me what are possible problem that why the code
exec("/usr/bin/convert h8Hjm.gif \"null:\" WFr1K.png -gravity Center -layers composite -layers optimize animation.gif",$out,$returnval);

is not working also animation.gif is not created in server also there no message printed.

Re: Gif Image is not animated after making watermark

Posted: 2014-02-19T23:50:25-07:00
by fmw42
Did you try this variation?

<?php
exec("/usr/bin/convert h8Hjm.gif null: WFr1K.png -gravity Center -layers composite -layers optimize animation.gif 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

Re: Gif Image is not animated after making watermark

Posted: 2014-02-19T23:58:19-07:00
by psanjib
when i run this code
<?php
exec("/usr/bin/convert h8Hjm.gif null: WFr1K.png -gravity Center -layers composite -layers optimize animation.gif 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

a message printed "convert: UnrecognizedLayerType `composite'."

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:00:55-07:00
by fmw42
that explains why it does not work. that is needed for that kind of operation. But the question is why is it not being accepted? see
http://www.imagemagick.org/script/comma ... php#layers
http://www.imagemagick.org/Usage/anim_mods/#background


what do you get from

<?php
exec("/usr/bin/convert -version 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:05:48-07:00
by psanjib
same message printed "convert: UnrecognizedLayerType `composite'."

sorry the message was
Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

Code: Select all

<?php 
exec("/usr/bin/convert -version 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

the above command shows which version

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:11:59-07:00
by fmw42
psanjib wrote:same message printed "convert: UnrecognizedLayerType `composite'."
Cannot be if you just ran the last command I sent. There is no -layers in the command. Run only the code I sent and not part of any other code.

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:13:46-07:00
by fmw42
psanjib wrote:same message printed "convert: UnrecognizedLayerType `composite'."

sorry the message was
Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

That is the problem. You are using an ancient version of IM (over 600 versions old). Ask you ISP where the more current version is located. Probably /usr/local/bin, but may not be. Some servers run different versions of IM and you are running one that was well before the time when -layers composite was introduced.

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:14:17-07:00
by psanjib
sorry the message was
Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

Code: Select all

<?php 
exec("/usr/bin/convert -version 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

the above command shows which version

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:16:20-07:00
by fmw42
Yes, IM 6.2.8 which is 600 version old. There must be a more current version on your system according to your phpinfo.

try

<?php
exec("type -a convert 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

or

<?php
exec("which convert 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

And see if either list a more current version of IM

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:20:02-07:00
by psanjib
you can check here http://www.gif-king.com/phpinfo.php the isp provider installed configuration for imagemagic and for magickwand

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:21:39-07:00
by psanjib
if i used this code

<?php
exec("type -a convert 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>

or

<?php
exec("which convert 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>


the print message is "convert is /usr/bin/convert"

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:27:22-07:00
by fmw42
then you must ask your ISP where they put the current version. it is not in the expected place and you need to put the full path to the current version of IM convert in your php code to make it work.


From your phpinfo:

ImageMagick version ImageMagick 6.8.8-5 Q16 x86_64 2014-02-13 http://www.imagemagick.org

Ask you ISP for the full path to this version

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:29:24-07:00
by psanjib
sorry not getting this line 'Ask you ISP for the full path to this version' please explain me clearly

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:30:51-07:00
by fmw42
The Internet Service Provider who hosts your server will know where the current version of IM resides. You must use that full path to convert to make use of the newer server. You 6.2.8 version of IM is too old to support the command you want.

Re: Gif Image is not animated after making watermark

Posted: 2014-02-20T00:59:40-07:00
by Bonzo
I would also try:

Code: Select all

<?php 
echo "/usr/local/bin/convert = ";
exec("/usr/local/bin/convert -version 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
echo "convert = ";
exec("convert -version 2>&1",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>