#46 Using OptiPNG seems to be lossy for particular image

v1.0 (example)
closed-works-for-me
nobody
None
5
2015-01-16
2014-06-18
No

Compression for the following image seems to be lossy:

https://ssl.gstatic.com/accounts/ui/avatar_2x.png

$ wget https://ssl.gstatic.com/accounts/ui/avatar_2x.png
$ optipng avatar_2x.png

Using Photoshop, or another image manipulation tool, it's obvious the grey background colour has changed slightly, from #dfdfdf to #e6e6e6.

Using OptiPNG 0.7.5, libpng 1.6.10-optipng and zlib 1.2.5.

Output below:

** Processing: avatar_2x.png
192x192 pixels, 3x8 bits/pixel, RGB
Reducing image to 8 bits/pixel, grayscale
Input IDAT size = 2138 bytes
Input file size = 2195 bytes

Trying:
  zc = 9  zm = 8  zs = 0  f = 0     IDAT size = 1259
  zc = 9  zm = 8  zs = 1  f = 0     IDAT size = 1245

Selecting parameters:
  zc = 9  zm = 8  zs = 1  f = 0     IDAT size = 1245

Output IDAT size = 1245 bytes (893 bytes decrease)
Output file size = 1302 bytes (893 bytes = 40.68% decrease)
2 Attachments

Discussion

  • Maki Chronik
    Maki Chronik
    2014-07-20

    I cannot see a change in colors, both images give dfdfdf as the gray background color for me

     
  • Ramona Truta
    Ramona Truta
    2014-07-22

    This is my observation also. Maybe Photoshop applied some color correction to the grayscale image?

    I also noticed that avatar_2x_optimized.png isn't fully optimized. Its size is 1663 bytes (not 1302, as reported in your submitted text output). I'm also seeing an output file of 1302 bytes in my testing. I suspect this is the effect of some other load/save operation applied to avatar_2x_optimized.png, post-optimization, and you lost some of this optimization on the way. (The file content is correct, though: the background is DFDFDF indeed.)

     
  • Ramona Truta
    Ramona Truta
    2014-07-22

    • status: open --> closed-works-for-me