Moshe
Moshe

Reputation: 58067

AS3 PNG Encoder?

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?

Upvotes: 2

Views: 8904

Answers (3)

Cameron
Cameron

Reputation: 98736

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

Upvotes: 7

Shrill
Shrill

Reputation: 306

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.

Upvotes: 2

Tyler Egeto
Tyler Egeto

Reputation: 5495

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.

Upvotes: 3

Related Questions