Warning: This library should probably not be used just yet
Library version of the lossypng command line tool.
Shrink PNG files by applying a lossy filter
go get -u github.com/peterhellberg/lossypng
Feel free to copy all or parts of this package into your own codebase.
The optimized images were encoded to PNG using a png.Encoder{png.BestCompression}
This compression technique was invented by Michael Vinther for his excellent Windows program, Image Analyzer. It does much more than just compression. It was ported and improved by William MacKay.
I have just converted it into a library.
All code in lossypng is public domain. You may use it however you wish.