Gifsicle manipulates GIF images and animations from the shell. Companion tools gifview and gifdiff display animations on X11 and compare GIF appearance.
Overview
Gifsicle is a classic Unix-style utility for working with GIF files without a graphical editor. Depending on flags, it can merge frames into animations, split animations into frames, adjust timing and looping, manage transparency and comments, rotate or flip images, reshape colormaps, and optimize file size.
The main program targets batch and script workflows. Gifview, when built, shows multi-frame GIFs on an X display as slideshows or real-time playback. Gifdiff checks whether two GIFs look the same, which the authors highlight for testing GIF-handling software.
Optimization can store only changed portions per frame and exploit transparency to shrink animations. The tool can also unoptimize animations to make frame editing easier, shrink colormaps, and apply palette choices including a Web-safe set. A documented lossy option further reduces size.
Build instructions cover standard Unix configure and make flows, optional omission of X11 viewers, and Windows builds via supplied makefiles. Prebuilt packages are listed for several distributions and macOS package managers on the project site.
Key features
- Merge and split GIF animations
- Frame editing and timing controls
- Animation size optimization
- Colormap and palette tools
- Transparency and interlacing control
- Batch in-place GIF editing
- Detailed GIF metadata output
- Optional gifview and gifdiff tools
Use cases
- Building GIF animations from frames
- Shrinking animated GIF file size
- Extracting frames from animations
- Automating GIF edits in scripts
- Verifying GIF output in tests