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

Doesn't work with CLI when quality option is set #70

Open
WangHansen opened this issue Aug 12, 2020 · 2 comments
Open

Doesn't work with CLI when quality option is set #70

WangHansen opened this issue Aug 12, 2020 · 2 comments

Comments

@WangHansen
Copy link

Run the following command:
$ imagemin p12.png --plugin.pngquant.quality={0.1,0.2} > ./images/p12.png

I got:

ArgumentError: (array `options.quality`) Expected `t` to be of type `number` but received type `string`
@Allain55
Copy link

Allain55 commented Sep 1, 2020

Any update on this? I get this error only if quality is set:

{
  shortMessage: 'Command failed with exit code 99: /%PROJECT_PATH%/node_modules/pngquant-bin/vendor/pngquant - --speed 1 --strip --quality 85-95',
  command: '/%PROJECT_PATH%/node_modules/pngquant-bin/vendor/pngquant - --speed 1 --strip --quality 85-95',
  exitCode: 99,
  signal: undefined,
  signalDescription: undefined,
  stdout: <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 07 80 00 00 04 38 08 06 00 00 00 e8 d3 c1 43 00 00 20 00 49 44 41 54 78 da ec 9a cd 72 db c8 11 ... 5192639 more bytes>,
  stderr: <Buffer >,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Bug introduced in v9.
It doesn't affect every image, don't know what's the difference

@gwicksted
Copy link

Error code 99 from pngquant means:

If conversion results in quality below the min quality the image won't be saved (if outputting to stdout, 24-bit original will be output) and pngquant will exit with status code 99.

It causes gulp-imagemin to fail too rather than copying the original file.

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

3 participants