You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: imagemagick/compress-animated-gif.md
+37-7
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,40 @@
1
-
# Compressing an animated GIF with ImageMagick mogrify
1
+
# Compressing an animated GIF with gifsicle or ImageMagick mogrify
2
+
3
+
## Using gifsicle
4
+
5
+
Tip via Mark Norman Francis [on Twitter](https://twitter.com/cackhanded/status/1423526489623044098):
6
+
7
+
> Saw your GIF size TIL, and `gifsicle -O3 --colors 48 --lossy` gets it down to 320k. You can tweak the number of colours and loss to get it smaller but that’s when it starts to look worse to my eyes
8
+
9
+
I installed it using `brew install gifsicle` and ran it like this:
10
+
11
+
```
12
+
/tmp % ls -lah datasette-launch.gif
13
+
-rw-r--r--@ 1 simon wheel 3.7M Sep 13 12:52 datasette-launch.gif
Found this tip [on Stack Overflow](https://stackoverflow.com/a/47343340/6083): to reduce the site of an animated GIF, you can use the `mogrify` tool like this:
4
40
@@ -17,9 +53,3 @@ The result was this 401KB GIF:
17
53
The `-fuzz 7%` option is [documented here](https://imagemagick.org/script/command-line-options.php#fuzz) - it treats similar colours as the same colour:
18
54
19
55
> The distance can be in absolute intensity units or, by appending % as a percentage of the maximum possible intensity (255, 65535, or 4294967295).
20
-
21
-
## Next time, try gifsicle
22
-
23
-
Mark Norman Francis [on Twitter](https://twitter.com/cackhanded/status/1423526489623044098):
24
-
25
-
> Saw your GIF size TIL, and `gifsicle -O3 --colors 48 --lossy` gets it down to 320k. You can tweak the number of colours and loss to get it smaller but that’s when it starts to look worse to my eyes
0 commit comments