CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Gifsicle

Gifsicle

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 05:28, 8 September 2005

Gifsicle is a UNIX command-line tool for creating, editing, and getting information about GIF images and animations. Making a GIF animation with gifsicle is easy (The % denotes a Unix/Linux command prompt):

   % gifsicle --delay=10 --loop *.gif > anim.gif 

But extracting frames from animations is easy too:

   % gifsicle anim.gif '#0' > firstframe.gif 

You can also edit animations by replacing, deleting, or inserting frames:

   % gifsicle -b anim.gif --replace '#0' new.gif 

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.
  • A dumb-ass name.

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.

Gifsicle is freely available. All you’ll need is an ANSI C compiler.

External Link

My wiki