compress-images icon indicating copy to clipboard operation
compress-images copied to clipboard

why gif become blurry after run "compress_images.js"

Open kousuanmd5 opened this issue 2 years ago • 1 comments

i use a 16M gif to compress , but the result gif is so blurry , How can I optimize it??

kousuanmd5 avatar Jun 28 '22 03:06 kousuanmd5

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:

  1. {gif: {engine: 'gifsicle', command: ['--colors', '64', '--use-col=web', '--scale', ' 0.8']}};
  2. {gif: {engine: 'giflossy', command: false}};
  3. {gif: {engine: 'gif2webp', command: ['-f', '80', '-mixed', '-q', '30', '-m', '2']}};

Yuriy-Svetlov avatar Sep 16 '22 21:09 Yuriy-Svetlov