Giter Site home page Giter Site logo

canvas-png-compression's People

Contributors

shyykoserhiy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

canvas-png-compression's Issues

How do i use it ?

var url = this.canvas.toDataURL();

here is my code , it said replace the toDataURL , so how do i pass in the this canvas ?

this.canvas.CanvasPngCompression.replaceToDataURL();

CanvasPngCompression.replaceToDataURL(this.canvas);

both tested is not working, can i ask how to mke it work ? thank

Size increases when compressed

I replaced the demo with a <700 KB PNG image, and the best canvas-png-compression can do is to "compress" it to 1.3 MB! By not using canvas-png-compression I get 900 KB.

With canvas-png-compression Weight : 1341kb
With canvas-png-compression Time taken : 1000 ms
Without canvas-png-compression Weight : 859kb
Without canvas-png-compression Time taken : 230 ms

Am I doing something incorrectly?

This is the sample image: https://failiem.lv/u/ck6xnu4u

Problem using on ios 9

When I tried to compress the image using iOs 9 it throws the following error:

TypeError: r.slice is not a function. (In ‘r.slice(4, r.length - 4)‘, ‘r.slice’ is undefined)

It worked fine for iOs 10 and 11.

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.