Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gifsicle: update page #8403

Merged
merged 9 commits into from
Aug 30, 2022
30 changes: 21 additions & 9 deletions pages/common/gifsicle.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# gifsicle

> Create GIFs.
> GIF manipulator.
> More information: <https://www.lcdf.org/gifsicle>.

- Optimise a GIF:
- Optimize a GIF as a new file:

`gifsicle --batch --optimize=3 {{amin.gif}}`
`gifsicle {{path/to/input.gif}} --optimize=3 -o {{path/to/output.gif}}`

- Make a GIF animation with gifsicle:
- Unoptimize a GIF in place:

`gifsicle --delay={{10}} --loop *.gif > {{anim.gif}}`
`gifsicle -b {{path/to/input.gif}} --unoptimize`

- Extract frames from an animation:
- Extract a frame from an animation:
CairnThePerson marked this conversation as resolved.
Show resolved Hide resolved

`gifsicle {{anim.gif}} '#0' > {{firstframe.gif}}`
`gifsicle {{path/to/input.gif}} '#{{0}}' > {{path/to/firstframe.gif}}`

- You can also edit animations by replacing, deleting, or inserting frames:
- Make a GIF animation from selected still/animated GIFs:

`gifsicle -b {{anim.gif}} --replace '#0' {{new.gif}}`
`gifsicle {{*.gif}} --delay={{10}} --loop > {{path/to/input.gif}}`
CairnThePerson marked this conversation as resolved.
Show resolved Hide resolved

- Reduce file size using multiple methods at the expense of quality:
CairnThePerson marked this conversation as resolved.
Show resolved Hide resolved

`gifsicle -b {{path/to/input.gif}} --optimize=3 --lossy={{100}} --colors={{16}} --dither`

- Delete the first 10 frames and all frames after #20 from an animation. There are editing options to insert, append and replace as well:
CairnThePerson marked this conversation as resolved.
Show resolved Hide resolved

`gifsicle -b {{path/to/input.gif}} --delete '#{{0-9}}' '#{{20-}}'`

- Modify an animation with various transformations. Put these before the animation filename to avoid specifying frame ranges:
CairnThePerson marked this conversation as resolved.
Show resolved Hide resolved

`gifsicle -b --crop {{50}},{{50}}+{{-50}}x{{-50}} --scale {{0.25}} --flip-horizontal --rotate-90 {{path/to/input.gif}}`