compress-images
compress-images copied to clipboard
why gif become blurry after run "compress_images.js"
i use a 16M gif to compress , but the result gif is so blurry , How can I optimize it??
Hi, You need to refer to the documentation.
enginegif (type:plainObject): Engine for compressing gif and options for compression. Key to be gif;
engine (type:string): Engine for compressing gif. Possible values: gifsicle, giflossy, gif2webp; command (type:boolean|array): Options for compression. Can be false or commands type array. For gifsicle - To use this library you need to install it manually. It does not work properly on some OS. npm install gifsicle --save. Example options: ['--colors', '64', '--use-col=web'] or ['--optimize'] In details gifsicle; For giflossy - (For Linux x64 and Mac OS X) ['--lossy=80'] In details giflossy; For gif2webp - ['-f', '80', '-mixed', '-q', '30', '-m', '2'] in details gif2webp; Example:
- {gif: {engine: 'gifsicle', command: ['--colors', '64', '--use-col=web', '--scale', ' 0.8']}};
- {gif: {engine: 'giflossy', command: false}};
- {gif: {engine: 'gif2webp', command: ['-f', '80', '-mixed', '-q', '30', '-m', '2']}};