Recently I have written about how to convert various forms of multimedia format to each other, especially GIF motion diagram, such as how to convert small video to GIF or convert GIF to video, there are a lot of tools like imagemagick,ffmpeg to help us accomplish such a task, However, there is a problem with the GIF motion graph output of the two tools, that is, the picture is not optimized, at least the volume of the output GIF is somewhat larger. Because most of the GIF is to be placed on the Web page, eventually downloaded to the user's browser, so it is necessary to optimize the volume of these GIF pictures, here we need to use another very useful GIF image modification tool: Gifsicle, It has a built-in method to optimize the volume of the GIF motion diagram.
Before you begin to introduce an optimization method for GIF images, one thing you need to know is that gifsicle is not just a GIF image optimization tool. Gifsicle can also adjust the size of the GIF image, merge multiple gif motion graphs, and so on, any action you can think of with GIF pictures.
Gifsicle has three optimization options for GIF images:
-O1
Save only the parts that change on each image. This is the default mode.
-O2
Further compress the picture with transparency.
-O3
Try various optimization methods (usually slower, sometimes with better results).
The command-line notation for optimizing GIF motion diagram is this:
-o3 animation-o animation-optimized. gif
If you have the patience and the time, -O3
it is recommended that you try it, it will probably give you a smaller volume of GIF motion diagram. In some pictures, it may compress more than 20% of the volume, depending on the animated GIF image you provide, it is possible to compress a larger volume.
Source: Http://www.webhek.com/optimize-gifs
How to compress a GIF picture using gifsicle