Giter Site home page Giter Site logo

lossypng's Introduction

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.

lossypng's People

Contributors

peterhellberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.