Você pode usar o gifcomb
A program to combine 2 GIF images of exactly the same size
into one. The color maps are merged, but the result may not exceed 256
colors. A boolean mask GIF file can be used to set which pixel from
two images to use at each location. Otherwise any background color
from first image is converted to second image color at that point.
Only the first image of each file is combined; again, all files' first
images must be of exactly the same size.
Está nos repos para 12,04 > > 16,04
sudo apt-get install gifcomb