oxipng icon indicating copy to clipboard operation
oxipng copied to clipboard

Implement gamma optimization option from TruePNG

Open shssoichiro opened this issue 8 years ago • 2 comments

https://css-ig.net/articles/truepng.php

in most of cases, it is better to disable any chunk that correct the way the image is displayed, specially for Web. gAMA chunk is not an exception, and the -g0 should delete it. However, TruePNG let you to merge the way the image is displayed instead of using gAMA chunk.

be warned, it is a no back process, so you should make a backup of your file (or use -out switch). gAMA chunk can be added or deleted, but in this case, it changes RGB values in the new file.

  • [ ] Implement gamma merging
  • [ ] Research other headers this could be used for

shssoichiro avatar Jul 21 '17 12:07 shssoichiro

The correct solution for all of gAMA, cHRM, and iCCP is to convert to sRGB using color profile transformation. If you're OK having dependency on LCMS2, I can supply required code.

kornelski avatar Jun 01 '18 22:06 kornelski

Thanks! I don't mind adding that dependency.

shssoichiro avatar Jun 04 '18 18:06 shssoichiro