### 16.4. Optimize

#### 16.4.1. Overview

An animation can contain several layers and so its size can be important. This is annoying for a Web page. The Optimize filters let you reduce this size. Many elements are shared by all layers in an animation; so they can be saved only once instead of being saved in all layers, and what has changed in each layer can be saved only.

GIMP offers two Optimize filters: Optimize (Difference) and Optimize (GIF). Their result doesn't look very different.

#### 16.4.2. Activating the Filters

You can find these filters in the main menu:

- Filters → Animation → Optimize (Difference)

- Filters → Animation → Optimize (for GIF)

- Filters → Animation → Unoptimize

#### 16.4.3. Example for the Optimize animation filters

Figure 17.438. Original image

In this animation, the red ball goes downwards and past vertical bars. File size is 600 kB.

Figure 17.439. Optimize (Difference)

File size moved to 153 kB. Layers held only the part the background which will be used to remove the trace of the red ball. The common part of layers is transparent.

Figure 17.440. Optimize (GIF)

File size moved to 154 kB, a bit bigger in the present example, but layer size has been reduced. Layers held only a rectangular selection which includes the part of the background which will be used to remove the trace of the red ball. The common part of layers is transparent.

#### 16.4.4. Unoptimize

The “Unoptimize” filter removes any optimizations on a layer-based animation. You may need this command if you want to edit the animation and it's not possible or not useful to undo any changes and start editing from the original image.

16.3. Burn-In |  | 16.5. Playback

Report a bug in GIMP Report a documentation error