Skip to content

peterhellberg/lossypng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning: This library should probably not be used just yet

lossypng

GoDoc

Library version of the lossypng command line tool.

Shrink PNG files by applying a lossy filter

Installation

go get -u github.com/peterhellberg/lossypng

Feel free to copy all or parts of this package into your own codebase.

Examples

Original image 320 KB

Original image

The optimized images were encoded to PNG using a png.Encoder{png.BestCompression}

Optimize(m, RGBAConversion, 10) 156 KB

Optimize(m, RGBAConversion, 10)

Optimize(m, GrayscaleConversion, 10) 40 KB

Optimize(m, GrayscaleConversion, 10)

Credit

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.

License

All code in lossypng is public domain. You may use it however you wish.

About

Library version of the lossypng command line tool by @foobaz

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages