Answer the question
In order to leave comments, you need to log in
How to convert RGBA array to PNG?
Have a good mood!
The crux of the matter: it all comes down to the desire to have a link or an explanation of where to get it.
Subject: you need a library-code in JavaScript (pure without the participation of the server)
that makes an RGBA array -> PNG binary (compression is optional).
Reason: Convert image from Canvas to -> PNG followed by -> Ctrl+S . and everything would be fine, because you can use toDataURL() , but the image is too large and it is not possible to display it in the browser window (a sad smiley flies in Chorme with a suggestion to reload the page).
Thank you in advance.
dated 08/30/2014:
found the project on GitHub (https://github.com/wheany/js-png-encoder ) it basically does what you need, but if you save the result to a file:
var pngFile = generatePng(width, height * cnt, rendBuff); // в файл img.png
Answer the question
In order to leave comments, you need to log in
https://github.com/imaya/CanvasTool.PngEncoder
https://github.com/hachque-Emscripten/libpng-1.2.49
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question