Optimieren Sie animierte GIF-Größe in der Befehlszeile
Wie komprimiere ich GIF-Animationen? Zum Beispiel durch Reduzierung des Farbindex.
Die Dateien werden mit Imagemagick generiert, aber die Optimierung scheint kompliziert.
Zum Beispiel ist die folgende Animation 864KB bei 150x119:
Zur Verwendung auf einem Linux-Rechner.
43
2 answers
Verwendung gifsicle (verfügbar für Mac OS X, Windows - , DOS, Debian - , FreeBSD und NetBSD).
gifsicle -i anim.gif -O3 --colors 256 -o anim-opt.gif
Dies optimiert und reduziert sich auf 256 Farben, wenn die Animation mehr Farben verwendet (das Beispielbild).
Sie können die Größe reduzieren, indem Sie die Anzahl der Farben reduzieren:
Basierend auf ein weiteres Q&A.
59
Author: qubodup,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2020-03-24 23:46:16
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2020-03-24 23:46:16
Kleine Ergänzung zu @qubodups Antwort
Add --lossy
Flagge. Diese Flagge variiert von 30 bis 200, wobei 30 gut genug ist.
gifsicle -O3 --colors 256 --lossy=30 -o output.gif input.gif
0
Author: Levon,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2021-01-22 19:48:16
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2021-01-22 19:48:16