Using OptiPNG seems to be lossy for particular image
Advanced PNG optimization program
Status: Beta
Brought to you by:
cosmin
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)
I cannot see a change in colors, both images give dfdfdf as the gray background color for me
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.)