Page 1 of 1

Reposition gif

Posted: 2016-09-13T09:14:12-07:00
by agriz

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
Image

The images are overlapped.
If i change the code a bit,
one animates and other becomes static
Or There is a blink between animations.

Re: Reposition gif

Posted: 2016-09-13T09:57:34-07:00
by fmw42
try adding -coalesce right before null:

Re: Reposition gif

Posted: 2016-09-13T10:36:47-07:00
by agriz
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.

Re: Reposition gif

Posted: 2016-09-13T11:29:15-07:00
by fmw42
What is your layers composite full command line? If that does not work, then try the other solution

Re: Reposition gif

Posted: 2016-09-13T11:30:17-07:00
by GeeMack
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.

Re: Reposition gif

Posted: 2016-09-13T18:30:17-07:00
by agriz
It is not working for me.

Added background none or background transparent after xc:none and -set dispose background before -layers.

Re: Reposition gif

Posted: 2016-09-13T18:34:19-07:00
by agriz
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.