UPNG.js icon indicating copy to clipboard operation
UPNG.js copied to clipboard

PNG Encoded ArrayBuffer back to IMG tag

Open mikeptweet opened this issue 3 years ago • 1 comments

So how does one get from the encoded contents ...

var png = UPNG.encode([dta.buffer], 200, 300, 0);

back to image data (or data url) that can be used in as the source in an element?

mikeptweet avatar Mar 30 '21 07:03 mikeptweet

Maybe this could help you (line 14 to 17) ? https://gist.github.com/candycode/f18ae1767b2b0aba568e

photopea avatar Mar 30 '21 08:03 photopea