Page 1 of 1

How to create animated glitters with PHP and imagemagick

Posted: 2008-12-11T22:51:31-07:00
by sabater_wb
Hy Guys,
After a lot of hours trying to create animated glitters, my last solution is this forum.
I wanna create something like the image bellow.

Image

I tried to use the code bellow, with the "stars" files replaced by others gifs, also created for this purpose.

Code: Select all

convert rose:   -compose Screen \
          \( -clone 0 stars1.gif -composite \) \
          \( -clone 0 stars2.gif -composite \) \
          \( -clone 0 stars3.gif -composite \) \
          -delete 0 -set delay 25 -layers Optimize rose_sparkle.gif
but, I did not have sucess.

I did this in php:

Code: Select all

<?

exec("D:/Arquiv~1/ImageMagick-6.4.3-Q16/convert.exe convert rose: -compose Screen -clone 0 stars1.gif -composite -clone 0 stars2.gif -composite -clone 0 stars3.gif -composite -delete 0 -set delay 25 -layers Optimize rose_sparkle.gif");

?>
I tried on localhost, with windows xp and apache.

The problem isn't with my server, because other simple codes works well.

Codes like:

Code: Select all

<?
exec("D:/Arquiv~1/ImageMagick-6.4.3-Q16/convert.exe koala.gif  -flip  flip.gif");
?>
and many others works very well.

Please, if somebody, knows how to do that effect using PHP and "exec()", please, give me some help. I thank.

thanks.

Re: How to create animated glitters with PHP and imagemagick

Posted: 2008-12-14T22:21:01-07:00
by anthony
You forgot the parenthesis! They are imporatant.

If you want to know what they do see IM Examples, Basics, parenthesis
http://www.imagemagick.org/Usage/basics/#parenthesis

As for glitter text, have a look at the examples in
All that Glitters...
http://www.imagemagick.org/Usage/anim_mods/#glitter

Re: How to create animated glitters with PHP and imagemagick

Posted: 2009-02-05T07:03:39-07:00
by SebGrey
Tnx for help, Anthony. I had the same problem & now everything's o'k! :D

Re: How to create animated glitters with PHP and imagemagick

Posted: 2009-02-05T19:22:18-07:00
by anthony
I what to look at some glitter overlays, and also overlaps involving seeds limited to a certian area (both of which I call sparkles). the above stars on a rose image is actually an example of 'sparkle'

I also want to get really fancy with the creation of flares from a specific seed point, complete with flare ring and rotating rays. then look at combining multilple flares with different starting points (both in time and space) to create a really interesting effect!

For example a 'sparkle' the travels up the wizards wand, then flares, and dissolves into a number of small sparkle flares over an area. before repeating.

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T01:58:34-07:00
by agriz
convert rose: -compose Screen \
\( -clone 0 stars1.gif -composite \) \
\( -clone 0 stars2.gif -composite \) \
\( -clone 0 stars3.gif -composite \) \
-delete 0 -set delay 25 -layers Optimize rose_sparkle.gif

This is working perfectly. But how to tile the glitter if the image is bigger?

convert rose: -compose Screen \
\( -clone 0 -tile stars1.gif -composite \) \
\( -clone 0 -tile stars2.gif -composite \) \
\( -clone 0 -tile stars3.gif -composite \) \
-delete 0 -set delay 25 -layers Optimize rose_sparkle.gif
is not working

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T10:25:34-07:00
by fmw42

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T10:45:01-07:00
by agriz
Can i get the resource usage?

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T12:07:29-07:00
by fmw42
agriz wrote:Can i get the resource usage?
Not sure what you are asking? Can you clarify?

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T12:42:55-07:00
by agriz
Just asking can track how much memory does this script uses?

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T13:52:45-07:00
by fmw42
agriz wrote:Just asking can track how much memory does this script uses?

What script? I am not sure how one would track memory usage?

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T14:04:40-07:00
by agriz
Any script.. just asked.. never mind!

Re: How to create animated glitters with PHP and imagemagic

Posted: 2011-10-12T14:31:45-07:00
by fmw42
agriz wrote:Any script.. just asked.. never mind!
Each script will use a different amount of memory depending upon the processing done and image sizes and numbers involved.