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?".
agriz
Posts: 237 Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308
Post
by agriz » 2016-09-13T09:14:12-07:00
Code: Select all
convert -size 500x500 xc:none \( -page +100+100 mouse.gif \) null: \( -page +0+0 mouse.gif \) -layers composite -loop 0 output.gif
The images are overlapped.
If i change the code a bit,
one animates and other becomes static
Or There is a blink between animations.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-13T09:57:34-07:00
try adding -coalesce right before null:
agriz
Posts: 237 Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308
Post
by agriz » 2016-09-13T10:36:47-07:00
I was trying -coalesce inside the parenthesis. It is working. But there is a frame missing when the animation repeat.
In usage, "You can do that by either, Coalescing the above animation, then deleting the Zero Delay Background frame, OR Layer Composite the original animation onto a Static Background"
I have used layer composite. But it is still doing that blink.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-13T11:29:15-07:00
What is your layers composite full command line? If that does not work, then try the other solution
GeeMack
Posts: 718 Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA
Post
by GeeMack » 2016-09-13T11:30:17-07:00
agriz wrote: I have used layer composite. But it is still doing that blink.
You might try putting "-background none" near the beginning of your command and "-set dispose background" near the end.
agriz
Posts: 237 Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308
Post
by agriz » 2016-09-13T18:30:17-07:00
It is not working for me.
Added background none or background transparent after xc:none and -set dispose background before -layers.
agriz
Posts: 237 Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308
Post
by agriz » 2016-09-13T18:34:19-07:00
I am not able to find the error.
Code: Select all
exec("/usr/bin/convert -size 500x500 xc:none -background transparent \( -page +100+100 mouse.gif \) -coalesce null: \( -page +0+0 mouse.gif \) -set dispose background -layers composite -loop 0 output.gif 2>&1", $output, $return);
//always return "-1073740791" for $return. Empty array for $output.
exec("/usr/bin/convert -size 500x500 xc:none \( -page +100+100 mouse.gif \) -coalesce null: \( -page +0+0 mouse.gif \) -layers composite -loop 0 output.gif 2>&1", $output, $return);
//once for every five run, return "-1073740791" for $return. Empty array for $output.
And instead of -size 500x500 xc:none, -size 500x500 xc:skyblue, the mouse is jumping on a white background and transparent background in different frames.