Skip to main content

Overview

GIF (Graphics Interchange Format) remains one of the most popular formats for sharing pixel art animations on the web. Aseprite provides comprehensive GIF export capabilities with advanced options for color handling, transparency, and optimization.
GIF animations are limited to 256 colors per frame and use indexed color mode. Aseprite automatically handles color conversion when exporting from RGB or grayscale sprites.

Quick Export

1

Open Export Dialog

Go to File → Export → Export as GIF or use File → Save Copy As and choose .gif extension.
2

Configure GIF Options

Set loop behavior, interlacing, and color optimization preferences.
3

Export

Choose output filename and save your animated GIF.
For quick sharing, use **File → Export → Upload to… ** services that automatically optimize GIFs for web.

GIF Limitations

Be aware of these GIF format constraints:
  • Maximum 256 colors per frame (8-bit color depth)
  • Single transparent color index (not partial transparency)
  • No alpha blending - pixels are either fully opaque or fully transparent
  • Limited compression compared to modern formats
  • Large file sizes for complex animations
GIF format is limited to 256 colors per frame. Aseprite will automatically generate an optimized palette from your sprite’s colors, but complex gradients or images with more than 256 unique colors will be quantized.

GIF Export Options

Loop Settings

Animation repeats continuously.
Loop: Enabled (0)
Result: Plays forever
This is the most common setting for animated GIFs on the web.

Interlaced GIF

Interlacing stores image data in a non-sequential order, allowing progressive rendering.How it works:
Pass 1: Every 8th row (0, 8, 16, 24...)
Pass 2: Every 8th row starting at 4 (4, 12, 20...)
Pass 3: Every 4th row starting at 2 (2, 6, 10, 14...)
Pass 4: Every 2nd row starting at 1 (1, 3, 5, 7...)
Non-interlaced:    Interlaced:
▓▓▓▓▓▓▓▓▓▓        ▓░░░░░░░░░  (Pass 1)
▓▓▓▓▓▓▓▓▓▓        ▓░░░▓░░░░░  (Pass 2)
▓▓▓▓▓▓▓▓▓▓        ▓░▓░▓░▓░▓░  (Pass 3)
▓▓▓▓▓▓▓▓▓▓        ▓▓▓▓▓▓▓▓▓▓  (Pass 4)
Advantages:
  • Progressive loading on slow connections
  • Low-resolution preview appears quickly
  • Better perceived performance
Disadvantages:
  • Slightly larger file size
  • More complex encoding/decoding
  • Less relevant with modern internet speeds
Disable interlacing for animations and modern web delivery. Enable it only for large static images on slow connections.

Color Handling

Palette Generation

When exporting RGB or grayscale sprites to GIF, Aseprite must convert to 256 colors:
Single palette for the entire animation.Best for:
  • Consistent colors across frames
  • Smaller file sizes
  • Sprites originally in indexed color
Frame 1: Uses global palette
Frame 2: Uses global palette
Frame 3: Uses global palette
Aseprite generates an optimized global palette containing the most used colors across all frames.

Dithering Options

When converting to 256 colors, dithering can simulate unavailable colors:

No Dithering

Each pixel mapped to nearest color
  • Clean, sharp edges
  • Color banding visible
  • Best for pixel art

Ordered Dithering

Patterned dithering for gradients
  • Visible pattern
  • Retro aesthetic
  • Good for gradients

Error Diffusion

Floyd-Steinberg dithering
  • Natural appearance
  • Less banding
  • Can blur details

Old Dithering

Classic Aseprite dithering
  • Legacy compatibility
  • Specific pattern
  • Nostalgic look
Original          No Dither       Ordered         Error Diffusion
████████          ████████        █▓▓▓█▓▓▓        █▓░░▓░░▓
██████            ████████        ▓█▓▓▓█▓▓        ▓█░▓░▓░█
████              ████            ▓▓█▓▓▓█▓        ░▓█░▓░▓█
██                                ▓▓▓█▓▓▓█        ░░▓█░▓░▓

Transparency Handling

GIF uses a single color index to represent transparency.Aseprite automatically:
  • Detects transparent pixels
  • Assigns a transparent index
  • Optimizes for transparency
Important:
  • Fully transparent (alpha = 0)
  • Fully opaque (alpha = 255)
  • No partial transparency!
Semi-transparent pixels (alpha 1-254) are either made fully transparent or fully opaque during export.
Determines when a pixel becomes transparent.
Threshold: 128
Alpha < 128: Transparent
Alpha ≥ 128: Opaque
Adjust the threshold if semi-transparent pixels aren’t exporting correctly.
Color shown in transparent areas for viewers that don’t support transparency.Best practices:
  • Match website background
  • Use neutral colors (white/black)
  • Consider viewer context

Frame Timing & Duration

GIF timing is specified in hundredths of a second (centiseconds).
Each frame’s display time in milliseconds (Aseprite) or centiseconds (GIF).Conversion:
Aseprite: 100ms per frame
GIF: 10 centiseconds (100ms ÷ 10)
GIF minimum timing is typically 20ms (2 centiseconds), though 0 is technically possible.

Disposal Methods

Disposal methods determine how frames composite:

Do Not Dispose

Keep previous frame, draw new on top
  • Best compression
  • Accumulating changes
  • Default for most animations

Restore Background

Clear to background before next frame
  • Larger file sizes
  • Required for transparency changes
  • Clean slate each frame

Restore Previous

Restore to previous frame state
  • Rarely used
  • Complex animation needs
  • Special effects
Do Not Dispose:        Restore Background:
Frame 1: ●             Frame 1: ●
Frame 2: ●●            Frame 2:  ●
Frame 3: ●●●           Frame 3:   ●
(Accumulates)          (Cleared each time)
Aseprite automatically selects the optimal disposal method for maximum compression while maintaining visual accuracy.

Optimization Techniques

1

Reduce Color Count

Use fewer colors for smaller file sizes.
  • Start with indexed color mode
  • Optimize palette before export
  • Remove unused colors
  • Limit palette to 128 or 64 colors
2

Minimize Frame Changes

Only change pixels that need updating.
  • Use disposal method “Do Not Dispose”
  • Keep background static
  • Animate only necessary elements
  • Aseprite automatically optimizes frame bounds
3

Optimize Frame Timing

Reduce number of frames when possible.
  • Remove duplicate frames
  • Increase frame duration instead of duplicating
  • Use longer delays for static moments
4

Reduce Resolution

Scale down for web delivery.
  • 2x or 4x pixel art scales well
  • Smaller dimensions = smaller files
  • Maintain aspect ratio
Pixel art typically looks best at integer scale factors (1x, 2x, 3x, 4x).
5

Post-Process Optimization

Use external tools for additional compression.Recommended tools:
  • gifsicle (command line)
  • giflossy (lossy compression)
  • ezgif.com (online optimizer)
gifsicle -O3 --colors 256 input.gif -o output.gif

Advanced Features

Export specific animation tags as separate GIFs.Workflow:
  1. Create animation tags in timeline
  2. Export with “Selected Frames” option
  3. Choose tag from dropdown
Output:
character-idle.gif
character-walk.gif
character-attack.gif
Control which layers are included in the export.Options:
  • All layers (merged)
  • Visible layers only
  • Specific layer selection
Hide guide layers, reference images, or UI elements before exporting.
Automatically trim empty space.Types:
  • Trim sprite: Remove empty borders from entire canvas
  • Trim cels: Crop each frame individually
Trimming individual frames can result in position shifts between frames.

Common Issues & Solutions

Causes:
  • Too many colors
  • High frame count
  • Large dimensions
  • Complex animations
Solutions:
  • Reduce color palette
  • Lower resolution
  • Remove duplicate frames
  • Optimize with external tools
  • Consider WebP format instead
For web, aim for under 1MB for good loading times.
Causes:
  • Automatic color quantization
  • Dithering artifacts
  • Color profile issues
Solutions:
  • Start with indexed color sprite
  • Manually create palette
  • Adjust dithering settings
  • Use “Preserve palette order” option
Causes:
  • Semi-transparent pixels
  • Wrong disposal method
  • Background color conflicts
Solutions:
  • Flatten alpha to 0 or 255
  • Check disposal method
  • Set appropriate background color
  • Test in target viewer
Causes:
  • Frame duration too short/long
  • Viewer ignoring timing
  • Twitter/platform limitations
Solutions:
  • Adjust frame duration in timeline
  • Use minimum 20ms per frame
  • Test in target platform
  • Enable “Twitter compatible” export
Causes:
  • Loop point mismatch
  • Disposal method problems
Solutions:
  • Ensure first and last frames connect seamlessly
  • Check disposal method
  • Add/remove frames to improve loop
  • Use onion skinning to preview loop

Command Line Export

Automate GIF export with CLI:
# Basic GIF export
aseprite -b sprite.aseprite --save-as animation.gif

# With options
aseprite -b sprite.aseprite \
  --save-as animation.gif \
  --scale 2 \
  --tag "walk"

# Multiple sprites to GIF
aseprite -b frame-*.png --save-as animation.gif
CLI export is perfect for build automation and batch processing.

GIF vs. Other Formats

FeatureGIFWebP
Colors256Millions
Transparency1-bit8-bit alpha
File sizeLargeSmall
Browser supportUniversalModern
AnimationYesYes
Use WebP for modern platforms, GIF for maximum compatibility.

Best Practices

Start with Indexed Color

Create sprites in indexed mode with optimized palette from the beginning

Test Loop Points

Use onion skinning to ensure smooth looping between first and last frames

Optimize for Platform

Consider file size limits and playback requirements of target platform

Preview Before Sharing

Test GIF in actual viewing context (social media, website, etc.)

File Formats

Compare GIF with other export formats

Sprite Sheets

Alternative for game development

PNG Sequences

Export individual frames

Build docs developers (and LLMs) love