问题
Is there a way to encode bitmap data into PNG for use with a FileReference.Save()
method in AS3? I assume I need an encoder library.
Where can I get a library that encode BitpmapData into PNG?
回答1:
You're looking for: https://github.com/mikechambers/as3corelib
There are probably other solutions, but this is widely used and well tested. I've used it myself on several occasions without issue.
回答2:
Shameless plug!
I just wrote a new PNG encoder called PNGEncoder2. It's extremely fast, offers three compression levels, supports huge images, and offers true asynchronous encoding (no pause at the end during the compression step).
More details, including usage examples and the full feature list, can be found in the README on GitHub. I also wrote a blog post about it, which includes a benchmark comparing it to other encoders (including Adobe's and blooddy's).
回答3:
I've been using blooddy_crypto.swc which you can read about and download here: http://va.lent.in/blog/2010/06/23/100x-times-faster-md5-and-more/ - I found it approx. 3 times faster than the adobe PNGEncoder.
来源:https://stackoverflow.com/questions/4211852/as3-png-encoder