Gif Image is not animated after making watermark

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

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

Re: Gif Image is not animated after making watermark

Post 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>";}
?>
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

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

Re: Gif Image is not animated after making watermark

Post 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>";}
?>
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

Post 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
Last edited by psanjib on 2014-02-20T00:13:07-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Gif Image is not animated after making watermark

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

Re: Gif Image is not animated after making watermark

Post 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.
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

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

Re: Gif Image is not animated after making watermark

Post 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
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

Post by psanjib »

you can check here http://www.gif-king.com/phpinfo.php the isp provider installed configuration for imagemagic and for magickwand
Last edited by psanjib on 2014-02-20T00:22:20-07:00, edited 1 time in total.
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

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

Re: Gif Image is not animated after making watermark

Post 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
psanjib
Posts: 20
Joined: 2014-02-04T23:03:41-07:00
Authentication code: 6789

Re: Gif Image is not animated after making watermark

Post by psanjib »

sorry not getting this line 'Ask you ISP for the full path to this version' please explain me clearly
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Gif Image is not animated after making watermark

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

Re: Gif Image is not animated after making watermark

Post 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>";}
?>
Post Reply