Last active
October 6, 2025 18:49
-
-
Save mrprofessor/7e211409c2bea046e13f348a6ae471d9 to your computer and use it in GitHub Desktop.
Delete frames 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
| #gifsicle -O3 -k 8 --lossy=80 -o tty-small.gif js_demo.gif | |
| #gifsicle --lossy=80 -o tty-small.gif js_demo.gif | |
| #gifsicle --delete "#0-12" -o tty-small1.gif tty-small.gif | |
| #gifsicle tty-small.gif --delete "#0-12" -o tty-small.gif | |
| # Make a copy of the file | |
| cp $1 $2 | |
| gifsicle "$1" --delete "#1-10" -o "$2" | |
| gifsicle "$2" --delete "#100-105" -o "$2" | |
| echo "script completed" |
Author
At least for my version** of gifscicle, change:
--delete "#1-10" # this will keep frame 0, which is probably unexpected
to:
--delete "#0-10"
Note: use 0 instead of 1, because initial frame is numbered 0.
(** version LCDF Gifsicle 1.93)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gifsicle input.gif output.gif