0

I have six gifs. They're the exact same dimensions (375x211), same duration, and same FPS. I want to be able to combine them to make a perfect 3x2 grid where they can all play simultaneously next to one another.

I've tried ImageMagick however that screws up in a number of ways. Firstly, it combines all six gifs into a single gif of the same length by only playing a fraction of each gif, which it tiles to my 3x2 grid, but secondly, it completely ruins the quality. It's like watching the gif through a blizzard.

Command used:

magick montage *.gif -geometry +0+0 -tile 3x2 montage.gif

This works fine on ordinary JPGs and PNGs so why does it behave this way with GIFs? Is there any way I can get my desired effect (whether with ImageMagick or not)? Ideally, this would all be in one command without any intermediary steps, but I'm willing to make sacrifices.

Spedwards
  • 4,167
  • 16
  • 49
  • 106
  • I am not sure that montage can combine animated gifs properly. I would write a script to montage (or append) each 4 frames and then combine all the combined frames into an animation again. Note that combining GIFs will lose quality, since GIF only allows a colormap of 256 colors. 4 GIF frames may have different 256 colormaps. Thus the colors would be reduced to 256 and so losing some of the colors. You should make all frames have the same colormap by using -remap with some "best" 256 colors colormap. – fmw42 Apr 12 '23 at 16:21
  • I dud something similar years back... https://stackoverflow.com/a/30932152/2836621 – Mark Setchell Apr 12 '23 at 16:29
  • I stand corrected. I can montage 4 same animated gifs together. However, my comments about quality and colormaps still stands when you have different input animated gifs that each have different colormaps. – fmw42 Apr 12 '23 at 16:42

0 Answers0