Last active
September 14, 2023 08:23
-
-
Save Rican7/4918a227910986d048ec to your computer and use it in GitHub Desktop.
Optimize a GIF for smaller size using Gifsicle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
# | |
# Gifsicle: http://www.lcdf.org/gifsicle/man.html | |
# | |
# Use `seq` to create a list sequence of integers, skipping every even number | |
# `seq -f "#%g" 0 2 213` | |
gifsicle --unoptimize image.gif | gifsicle --dither --colors 48 --resize-fit-width 512 -O2 `seq -f "#%g" 0 2 213` -o image.optimized.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment