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?".
Using montage and append seem intended for stills and will unpack animated gifs into individual frames. I would like to combine many gifs into a "contact sheet" of animations. Is this possible without knowing the size of each source gif beforehand? I imagine the source gifs may need to be trimmed or forced into the same speed and duration, which is okay.
Thanks
I'm not sure what you want. Perhaps you have a number of animated GIFs, and you want to create a single GIF that is made from the input GIFs placed side-by-side or below each other, or in a grid.
This is easily done by keeping the GIFs separate, and showing them on an HTML page.
Combining them into a single GIF (which will be limited to 256 colours, and may need re-sizing and re-timing of each input) can be done. See http://www.imagemagick.org/Usage/anim_mods/#append and other sections of that page.
Thanks, and sorry for my unclear wording. I wanted to combine many GIFs into a single GIF.
It seemed like the 'anim_mod' examples were geared towards when you know the exact size and how many source gifs need to be appended. I was wondering if there was a technique more similar in flexibility to montage, which I can be given any number images, all at different sizes, and it automatically creates a nice "contact sheet". The potential re-sizing and re-timing compromises are not an issue for me.
Are you asking to take one animated gif and extract all the frames and make a contact sheet of those? Or are you asking to make an animated contact sheet from many animated gifs?
trig.vee wrote: ↑2019-10-13T10:48:41-07:00
The latter. I want to make an animated contact sheet from many animated gifs.
The problem with that is that you need to sync the animations. That generally only works well if you have the same number of frames and the same delays in all the animations. See https://imagemagick.org/Usage/anim_mods/#merging
I wouldn't mind if the frame counts and delays are adjusted in order to make it work; similar to how montage will resize images to match the largest/smallest image in the grid.
It sounds like there isn't currently a magical way to do this, so I will try this process:
1. Separate each source animation into coalesced static frames.
2. Find the GIF with the most frames (X), and add frames to all other GIFs until they also have X frames.
3. Loop over X frames, grabbing a frame from each source GIF then generating a static contact sheet using the montage command.
4. Finally, take all those static contact sheet images and compile into a single animated contact sheet GIF.
Let me know if a simpler way comes to mind, otherwise thanks for helping me think through it.
I can create a montage of animations and it will animate using the latest beta (IM 6.9.10.69 or IM 7.0.8.69). If they have different numbers of frames, an empty spot will appear. So it should be easy for you to create your contact sheet of animations. Just make the tiling correspond to the number of animations you provide and include your new desired delay.
Starting from your example, it seems like ImageMagick jumbles up the frames between different GIFs. In your example, it's hard to tell since the source gifs don't have any linear continuity.
Here's my result using 4 copies the same source gif:
You need to add the -delay so we can see better. Perhaps it syncs when a delay is properly set. You need to use the beta version or wait for it to be released in order to use -delay in montage.