happytails.ai

Compress GIF

Open Compress GIF on Happytails.ai. This view has the same page content and links, with explicit tool capabilities. Read the processing notes before using a tool.

Tool capabilities

{
  "id": "compress-gif",
  "category": "image-tools",
  "built": true,
  "requirements": "Runs locally in your browser. Choose one animation up to 20 MiB, 120 frames, 1920 pixels per side and 16 million decoded frame pixels. Processing stops after 120 seconds. Every frame is retained. GIF timing and playback count are preserved; APNG timing rounds cumulatively to 10 milliseconds and playback count is mapped to GIF repeats. GIF supports only binary transparency: the selected alpha threshold is applied after resizing. Palette and dither settings change color quality. Output may be larger; compare before and after bytes. Unsafe delta-frame optimization falls back to full-canvas frames and is reported. Files stay on your device.",
  "implementation": {
    "fields": [
      {
        "key": "colors",
        "label": "Palette colors",
        "value": "64",
        "type": "select",
        "values": [
          "32",
          "64",
          "128",
          "256"
        ]
      },
      {
        "key": "dither",
        "label": "Dithering",
        "value": "sierra2_4a",
        "type": "select",
        "values": [
          "none",
          "bayer",
          "sierra2_4a"
        ]
      },
      {
        "key": "alphaThreshold",
        "label": "Alpha threshold (1 to 255)",
        "value": 128,
        "type": "number",
        "min": 1,
        "max": 255,
        "step": 1
      },
      {
        "key": "optimizeFrames",
        "label": "Optimize frame rectangles",
        "value": "true",
        "type": "select",
        "values": [
          "true",
          "false"
        ]
      }
    ],
    "registrationFamily": "gif-repair",
    "presentation": "metrics",
    "files": true,
    "multiple": false,
    "input": false,
    "accept": ".gif,image/gif",
    "maxFileBytes": 20971520,
    "note": "Runs locally in your browser. Choose one animation up to 20 MiB, 120 frames, 1920 pixels per side and 16 million decoded frame pixels. Processing stops after 120 seconds. Every frame is retained. GIF timing and playback count are preserved; APNG timing rounds cumulatively to 10 milliseconds and playback count is mapped to GIF repeats. GIF supports only binary transparency: the selected alpha threshold is applied after resizing. Palette and dither settings change color quality. Output may be larger; compare before and after bytes. Unsafe delta-frame optimization falls back to full-canvas frames and is reported. Files stay on your device.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "Your text",
      "placeholder": "Type or paste your input…",
      "help": "Up to 1,000,000 characters. Review the settings before running.",
      "helpParts": [
        "Up to 1,000,000 characters.",
        "Review the settings before running."
      ],
      "action": "Compress GIF"
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "POST /api/v1/tools/compress-gif/run",
  "api": {
    "id": "compress-gif",
    "name": "Compress GIF",
    "category": "image-tools",
    "description": "Reduce an animated GIF with palette and frame-rectangle options, retaining every frame and showing actual size and color changes.",
    "notes": "Processed by the local, self-hosted engine. No third-party conversion service is used. Reduces the palette and optimises frames. Timing is preserved. Some already optimised files may become larger.",
    "human_path": "/en/image-tools/compress-gif/",
    "method": "POST",
    "endpoint": "/api/v1/tools/compress-gif/run",
    "schema_url": "/api/v1/tools/compress-gif",
    "input_schema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "input": {
          "type": "string",
          "maxLength": 1000000,
          "default": "",
          "description": "Plain text input. File tools use files instead unless otherwise documented."
        },
        "options": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "colors": {
              "type": "string",
              "description": "Palette colours",
              "default": "64",
              "enum": [
                "32",
                "64",
                "128",
                "256"
              ]
            }
          }
        },
        "files": {
          "type": "array",
          "maxItems": 1,
          "items": {
            "type": "object",
            "required": [
              "name",
              "base64"
            ],
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "description": "Filename only, no path."
              },
              "mime": {
                "type": "string",
                "maxLength": 150
              },
              "bytes": {
                "type": "integer",
                "minimum": 0,
                "description": "Optional decoded byte count; must match content if supplied."
              },
              "base64": {
                "type": "string",
                "contentEncoding": "base64",
                "description": "File bytes as padded base64. Use the tool-specific limits.files_bytes value for the total decoded input size."
              }
            }
          }
        }
      }
    },
    "output_schema": {
      "type": "object",
      "required": [
        "tool",
        "result"
      ],
      "properties": {
        "tool": {
          "type": "string"
        },
        "result": {
          "type": "object",
          "required": [
            "text",
            "files"
          ],
          "properties": {
            "text": {
              "type": [
                "string",
                "null"
              ]
            },
            "data": {
              "description": "Parsed JSON when the textual result is JSON."
            },
            "name": {
              "type": "string"
            },
            "mime": {
              "type": "string"
            },
            "files": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "name",
                  "mime",
                  "bytes",
                  "base64"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "base64": {
                    "type": "string",
                    "contentEncoding": "base64"
                  }
                }
              }
            }
          }
        }
      }
    },
    "processing": "Server; self-hosted native engine, no external conversion service",
    "limits": {
      "request_bytes": 31457280,
      "input_characters": 1000000,
      "files_bytes": 20971520,
      "max_files": 1,
      "timeout_seconds": 90
    }
  },
  "agent_processing": "Server; self-hosted native engine, no external conversion service",
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}

Page guide

Reduce an animated GIF with palette and frame-rectangle options, retaining every frame and showing actual size and color changes.

How to use Compress GIF
  1. Choose one GIF and select palette colors, dithering, alpha threshold and frame optimization.
  2. Run the compression and compare original and result animation, file sizes and color-error metrics.
  3. Download the GIF and its JSON report. A larger result is reported honestly; keep the original if it better meets your needs.

Useful next steps

Compression trades palette detail for size

Choose 32, 64, 128 or 256 palette colors and no dithering, Bayer dithering or Sierra dithering. Fewer colors can reduce size but alter gradients and detail. Every frame is retained; frame removal is always zero. Some inputs produce a larger output.

Check transparent regions and fallback

GIF transparency is binary. The alpha threshold ranges from 1 to 255. Frame-rectangle optimization is accepted only when its decoded frames match a full-canvas encoding with the same palette. An unsafe optimization falls back to full-canvas frames and is recorded in the report.