kornelski / pngquant

Lossy PNG compressor — pngquant command based on libimagequant library
https://pngquant.org
Other
5.25k stars 486 forks source link

color issues in game picture #335

Closed Lee-lithium closed 5 years ago

Lee-lithium commented 5 years ago

i use pngquant compress some anime game picture but some picture have a little issues in attach file (picture have some safe modify) uncompress.png (RGBA32) eyes color is blue but compressed.png (PAL8) eyes color is green attach.zip

i compress a lot of game , i found two or three game have the same issue compressed png is fine, but a little part have color issues

i need to change my Options? or have other solution? i try a old version pngquant, have the same issue

pngquant Version 2.12.3 Options: --force --speed 1 --quality 80-100 --strip --verbose

kornelski commented 5 years ago

The input file has a cHRM chunk which defines its color space. You must compile pngquant with LCMS2 to support this properly.

Run pngquant -h to see if color profiles are supported.

Color profiles are supported via Little CMS. Using libpng 1.6.37.

If they are, the result is correct:

uncompress-fs8

Lee-lithium commented 5 years ago

color profiles i'm so sorry, this my fault that attach picture can't correct reproduce issue i upload new attach, Hope that picture doesn't offend you...

01_uncompress (RGBA32) // left red hair character is blue eyes 01_compressed (PAL8) // left red hair character is green eyes

02_uncompress(RGBA32) //right red hair character is blue eyes 02_compressed(PAL8) //right red hair character is green eyes

and in 02_compressed picture compressed quality is very low have a lot of quality loss in this picture i have wrong options? or 02_compresse is not applicable to pngquant?

pngquant is a amazing tool, thanks your help

kornelski commented 5 years ago

As part of a larger image this distortion does make sense. There's a lot more green colors in the image and they get unified. It's a limitation of the algorithm.

Lee-lithium commented 5 years ago

thanks your help , i understand can you suggest me another lossy png compress tool or method?

i try some compress tool to compress png the pngquant is very useful i compress a lot of game only a few png picture get this issue

zvezdochiot commented 5 years ago

@Lee-lithium say> can you suggest me another lossy png compress tool or method?

kornelski commented 5 years ago

Try https://imageoptim.com/online - it handles that picture well.

Lee-lithium commented 5 years ago

thanks you kornelski and zvezdochiot i think this issue is solved