Skip to content

Instantly share code, notes, and snippets.

View robbaier's full-sized avatar

Rob Baier robbaier

  • Chicago
View GitHub Profile
@robbaier
robbaier / gif-optimize.sh
Last active August 3, 2023 21:14
Script to optimize GIFs. Uses Gifsicle to drop frames, increase delay, reduce color depth and optimize
#!/bin/sh
# Script: gif-optimize.sh
# Author: Rob Baier
# Description: Script used to optimize animated GIF files.
# Dependencies: Gifsicle (https://github.com/kohler/gifsicle)
# Environment: Tested on MacOS 10.12. Other *nix environments may require some tweaking.
# Usage: ./gif-optimize.sh input-filename.gif
# Helper function to convert bytes into a human-readable format