Cross-fade GIF Frames
Add smooth cross-fade transitions between GIF frames online. Adjust overlap, easing, and FPS. Download the result as a new animated GIF.
About
Animated GIFs with hard frame cuts produce a jarring, flickering appearance. Cross-fading inserts interpolated transition frames between each original frame pair, blending pixel values by a factor t that sweeps from 0 to 1 across the overlap window. The result is a smoother animation at the cost of increased frame count and file size. This tool performs real binary GIF decoding (LZW decompression), per-pixel alpha blending on the raw RGBA raster, and re-encoding with median-cut color quantization back to a valid GIF89a file. No server upload occurs. All processing runs locally in a Web Worker.
Choosing too many overlap frames relative to your source frame count will collapse distinct keyframes into a continuous morph, losing the original animation's pacing. A good starting point is 2 - 4 overlap frames at 15 - 20 fps. The easing curve controls whether the blend accelerates at the start (ease-in), decelerates at the end (ease-out), or remains uniform (linear). This tool approximates cubic BΓ©zier easing; results may differ slightly from CSS-based easing curves.
Formulas
The cross-fade blend for each pixel at interpolation step k out of n overlap frames between source frame A and frame B:
Where k ranges from 1 to n. The easing function maps the linear ratio to a curved value:
Total output frame count Fout for Fsrc source frames with n overlap frames per transition:
Where Argba = source pixel RGBA from frame A, Brgba = source pixel RGBA from frame B, n = number of cross-fade frames inserted per transition, t = normalized blend factor after easing in range [0, 1].
Reference Data
| Easing Type | Behavior | Best For | Formula Approximation |
|---|---|---|---|
| Linear | Constant blend rate | Technical / uniform transitions | t = t |
| Ease-In | Starts slow, accelerates | Dramatic reveals | t2 |
| Ease-Out | Starts fast, decelerates | Settling / landing effects | 1 β (1 β t)2 |
| Ease-In-Out | Slow start & end | Most natural-looking fades | Smoothstep: 3t2 β 2t3 |
| Source Frames | Overlap | Output Frames | File Size Impact |
|---|---|---|---|
| 10 | 1 | 19 | ≈ 1.9Γ |
| 10 | 2 | 28 | ≈ 2.8Γ |
| 10 | 3 | 37 | ≈ 3.7Γ |
| 10 | 4 | 46 | ≈ 4.6Γ |
| 10 | 5 | 55 | ≈ 5.5Γ |
| 20 | 2 | 58 | ≈ 2.9Γ |
| 20 | 4 | 96 | ≈ 4.8Γ |
| 30 | 3 | 117 | ≈ 3.9Γ |
| 50 | 2 | 148 | ≈ 3.0Γ |
| 5 | 2 | 13 | ≈ 2.6Γ |
| GIF Spec Field | Bytes | Description |
|---|---|---|
| Signature | 6 | GIF89a magic bytes |
| Logical Screen Descriptor | 7 | Width, height, color table flags |
| Global Color Table | 3 Γ 2N+1 | RGB palette entries |
| Graphic Control Extension | 8 | Disposal, delay, transparency index |
| Image Descriptor | 10 | Position, size, interlace, local table flag |
| LZW Minimum Code Size | 1 | Initial code bit width |
| Image Data Sub-blocks | Variable | LZW-compressed pixel indices |
| Trailer | 1 | 0x3B end marker |