Gifsicle is a UNIX command-line tool for creating, editing, and getting
information about GIF images and animations.  You can also extract frames from
animations, or replace, delete, or insert frames into existing animations.

Some more gifsicle features:
- Batch mode for changing GIFs in place.
- Prints detailed information about GIFs, including comments.
- Control over interlacing, comments, looping, transparency...
- Creates well-behaved GIFs: removes redundant colors, only uses
  local color tables if it absolutely has to (local color tables
  waste space and can cause viewing artifacts), etc.
- It can shrink colormaps and change images to use the Web-safe
  palette (or any colormap you choose).
- It can optimize your animations!  This stores only the changed
  portion of each frame, and can radically shrink your GIFs.  You
  can also use transparency to make them even smaller.  Gifsicle's
  optimizer is pretty powerful, and usually reduces animations
  to within a couple bytes of the best commercial optimizers.
- Unoptimizing animations, which makes them easier to edit.

Two other programs are included with gifsicle: gifview is a lightweight
animated-GIF viewer which can show animations as slideshows or in real
time, and gifdiff compares two GIFs for identical visual appearance.

Homepage:
https://www.lcdf.org/~eddietwo/gifsicle/
