Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why gif become blurry after run "compress_images.js" #67

Open
kousuanmd5 opened this issue Jun 28, 2022 · 1 comment
Open

why gif become blurry after run "compress_images.js" #67

kousuanmd5 opened this issue Jun 28, 2022 · 1 comment

Comments

@kousuanmd5
Copy link

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

@Yuriy-Svetlov
Copy link
Owner

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']}};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants