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

Don't stop optimization when pngquant cannot optimize #6

Closed
brianpkennedy opened this issue Sep 18, 2014 · 0 comments
Closed

Don't stop optimization when pngquant cannot optimize #6

brianpkennedy opened this issue Sep 18, 2014 · 0 comments

Comments

@brianpkennedy
Copy link

I am using v1.0.2. I assumed that since the arguments to pngquant include --skip-if-larger, that an image that failed to optimize because the outputted file was too large.

This is the output i get when using imagemin-pngquant through a grunt command, with verbose turned on.

Warning: Command failed: /var/folders/vk/vl8x2sx57mxg5skf6nr7lztn8r0910/T/25c835bd-fd08-418a-b752-ba5fd495cf45:
  read 5KB file
  made histogram...254 colors found
  eliminated opaque tRNS-chunk entries...158 entries transparent
  mapped image to new colors...MSE=0.000 (Q=100)
  writing 254-color image as 7a701b63-b8c4-48c0-a770-ad3bb876fe05
  file exceeded expected size of 4KB
  writing truecolor image as 7a701b63-b8c4-48c0-a770-ad3bb876fe05
Skipped 1 file out of a total of 1 file.
 Use --force to continue.

The call to the pngquant binary is returning an error code of 98, which is TOO_LARGE_FILE. Since we are skipping large files, this response should not be treated as an error.

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

1 participant