我认为这个"答案"是,它是为你的目的而制作不良的动画。你可以使用ImageMagick查看动画包含的12个类似于此的帧:
identify anim.gif
anim.gif[0] GIF 400x350 400x350+0+0 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[1] GIF 1x1 400x350+0+0 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[2] GIF 226x152 400x350+85+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[3] GIF 218x152 400x350+89+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[4] GIF 210x152 400x350+93+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[5] GIF 202x152 400x350+97+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[6] GIF 194x152 400x350+101+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[7] GIF 194x152 400x350+101+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[8] GIF 202x152 400x350+97+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[9] GIF 210x152 400x350+93+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[10] GIF 218x152 400x350+89+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
anim.gif[11] GIF 226x152 400x350+85+8 8-bit sRGB 256c 106KB 0.000u 0:00.000
您可以将图像拆分为其组成帧,并像这样使白色区域透明:
convert anim.gif -transparent none frame-%02d.gif
-rw-r--r-- 1 mark staff 9777 4 May 11:11 frame-11.gif
-rw-r--r-- 1 mark staff 9732 4 May 11:11 frame-10.gif
-rw-r--r-- 1 mark staff 9681 4 May 11:11 frame-09.gif
-rw-r--r-- 1 mark staff 9835 4 May 11:11 frame-08.gif
-rw-r--r-- 1 mark staff 9533 4 May 11:11 frame-07.gif
-rw-r--r-- 1 mark staff 9479 4 May 11:11 frame-06.gif
-rw-r--r-- 1 mark staff 9986 4 May 11:11 frame-05.gif
-rw-r--r-- 1 mark staff 9907 4 May 11:11 frame-04.gif
-rw-r--r-- 1 mark staff 10070 4 May 11:11 frame-03.gif
-rw-r--r--@ 1 mark staff 10099 4 May 11:11 frame-02.gif
-rw-r--r-- 1 mark staff 43 4 May 11:11 frame-01.gif
-rw-r--r--@ 1 mark staff 15917 4 May 11:11 frame-00.gif
您可以像这样将所有帧拼接在一起:
convert anim.gif -transparent white miff:- | montage -tile 3x -frame 5 - montage.jpg
![enter image description here](https://istack.dev59.com/DMJVi.webp)
如果您尝试使用“背景”方法将帧拼回去,那么只出现在第一帧中的单词“welcome”将会丢失:
convert -dispose background frame-0* a.gif
![enter image description here](https://istack.dev59.com/F27LS.gif)
如果您尝试在动画之前将第一帧(即“welcome”)与其他每个帧合成,您将得到一个黑色的幽灵,因为男孩和女孩角色也出现在第一帧中:
convert frame-00.gif frame-02.gif -geometry +85+8 -composite x.gif
![enter image description here](https://istack.dev59.com/KrYNb.gif)
我唯一能想到的解决方法是将第一帧导入到Photoshop中,然后移除男孩和女孩,并重新构建动画...但是,我不是动画方面的专家,现在所有的帧都已经“摆在桌面上”,其他人也许能告诉你更简单的方法。