Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

About Gifsicle:

Gifsicle is a command-line tool for creating, editing, and getting information about GIF images and animations.

One of its features is (from its website):

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.

I call Gifsicle through this .BAT file in the Right Click - 'Send to' Menu:

@echo off

"C:\Programs\Compression Scripts\gifsicle\bin\gifsicle.exe" --batch -V -O3  %1%
if exist %1% goto compressFile

This animated GIF file, however:, when its compression is optimized with Gifsicle with the above commands, results in a larger-filesized GIF file. Gifsicle overwrites the original GIF file with the resulting larger-filesized GIF file.

Initial filesize: 7.57 MiB (7,942,886 bytes). After running through the above commands with Gifsicle: 7.64 MiB (8,017,622 bytes).

Is there a way to prevent Gifsicle from overwriting the original file if its output file is larger than the original file, while still overwriting the original file if the output file is smaller?

OS: Windows 7
Gifsicle version: 1.63, from the binary provided here:
Gifsicle manual

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.