Arrange animated gifs

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?".
Post Reply
Rye
Posts: 158
Joined: 2013-02-25T10:43:05-07:00
Authentication code: 6789

Arrange animated gifs

Post by Rye » 2019-01-20T12:04:50-07:00

Is what this tool does: https://ezgif.com/combine

Possible with imagemagick ? (taking two animated gifs and place them next to each other )

Note: I'm not looking to "put the frames of the gifs next to each other" (as described here: viewtopic.php?t=22117)
Thanks in advance:

- Rye

User avatar
fmw42
Posts: 24737
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Arrange animated gifs

Post by fmw42 » 2019-01-20T12:15:36-07:00

If the two animations have the same number of frames and delays, then Imagemagick can do that. See https://imagemagick.org/Usage/anim_mods/#append. But that reference is good also. So why not try to do the same. If you have trouble, post your code and animations and we can try to help further.

Code: Select all

convert animation1.gif animation2.gif +append -layer optimize animation3.gif
__________________

Please, always provide your IM version and platform when asking questions, since syntax may differ.

Also provide your exact command line and your images, if possible.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli

Rye
Posts: 158
Joined: 2013-02-25T10:43:05-07:00
Authentication code: 6789

Re: Arrange animated gifs

Post by Rye » 2019-01-20T12:18:42-07:00

Hah, you broke a new speed record :-D.

Nice. That is exactly what I was looking for. Looks good, the images both have the same dimensions and frame number.

(I wonder. That website, does it use imagemagick aswell ?)


EDIT: I get a "-layer" command not recognized error (both with "convert" and "magick")
https://i.ibb.co/zn2B9LQ/Screenshot-201 ... -31-17.jpg


EDIT2: Upgraded to the latest version available (ImageMagick-7.0.8-24-Q16-x64-dll.exe)

yet, still get the "-layers not recognized" error... (Now the Error code is 2123)
(PerlMagick always fails to install on my machine, but this is probably not related to the -layers issue, right ?)

What... is this due to ?
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC

Post Reply