photopea / UPNG.js

Fast and advanced PNG (APNG) decoder and encoder (lossy / lossless)
MIT License
2.1k stars 259 forks source link

Add example of getting PNG from Canvas and optimising with UPNG #26

Closed JanisE closed 6 years ago

photopea commented 6 years ago

I am not familiar with Promises, Blobs and FileReader. What does your code do?

It seems like you already get an encoded PNG from canvas, you decode it with UPNG and encode it again? It is just crazy. You can get raw pixel data from canvas directly with getImageData. I will write an example into readme.

JanisE commented 6 years ago

Thank you!