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.
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.