Page 1 of 1

magick animation subplot

Posted: 2018-10-08T07:46:36-07:00
by mattfack
Hi everyone,

I am using ImageMagick 7.0.8-12 Q16 x86_64 2018-09-23.

I usually mount pngs into one gif with

Code: Select all

magick @fileorder.txt mygif.gif
Now I would like to duplicate that command, i.e. have two gifs one above the other synchronized.
Can I animate two sets of pngs one above the other?

As an example you have a typical folder/subfolder structure here [1] with pngs and txts.

The result should be something similar to the procedure explained here [2] but should be simpler if one could already combine the pngs without converting gifs to single figures.

Thanks

[1] https://www.dropbox.com/sh/32ymutc2e1yc ... zjOWa?dl=0

[2] https://www.imagemagick.org/Usage/anim_mods/#append

Re: Double gif

Posted: 2018-10-08T09:05:42-07:00
by snibgo
IM can make an animated GIF from a list of individual frames. On your case, each frame comes from two sources.

The easiest way may be a script, but I expect it can be done in a single magick command, thus: read the first fileorder.txt, then NULL:, then the second list. Now we have two lists, and you can append them pairwise with "-compose Append -layers composite". See http://www.imagemagick.org/script/comma ... php#layers

However, sadly, IM doesn't have "-compose Append". If all the images have the same dimensions, and the size of the output frames is (say) 200x300, then:

Code: Select all

magick @list1.txt -gravity North -extent 200x300 NULL: @list2.txt  -compose Over -gravity South -layers composite out.gif

Re: magick animation subplot

Posted: 2018-10-09T01:42:00-07:00
by mattfack
Thanks snibgo, your solution works perfectly, and it is also very fast.

The alternative I came up with was to use a script to

1. append the png images creating a new composed png
2. animate the new pngs
3. remove the generated pngs

Cheers