Quick tip: Fastest ActionScript PNGEncoder (update)

Here are some benchmark tests for current available PNGEncoders. Sync encoding tested on 2 real bitmap images (500x300px, 256x256px) on Intel Core 2 Duo @ 2.80GHz, win XP:

encoder / image                         500x333 px  256x256 px
by.blooddy.crypto.image.PNG24Encoder     78ms       125ms
dsk.PNGEncoder							140ms		141ms
net.kaourantin.PNGEnc					188ms		187ms
mx.graphics.codec.PNGEncoder			203ms		172ms
com.adobe.images.PNGEncoder				219ms		172ms
org.aswing.image.png.AsPngEncoder		234ms		172ms
ru.inspirit.encoders.png.PNGEncoder		391ms		203ms

by.blooddy.crypto.image.PNG24Encoder worked fastest for me.

Update Nov 15, 2011: There is a new worth to try async and superfast encoder from Cameron written in HaXe called PNGEncoder2.

Check out some more benchmarks from Blooddy and Cameron.

download sources:

6 comments so far

  1. Tahir Ahmed July 21, 2010 14:39

    Thanks for that.

    – Tahir.

  2. Tyler Larson September 7, 2010 18:27

    Some of them claim to be able to create smaller files.
    It would be interesting to see this with the image output size.
    Can we get your test source?
    Thanks for doing this.

  3. Jozef Chúťka September 9, 2010 10:35

    Hi @Tyler,
    you are right, that would be interesting to see the differences in output size. I am sorry I did not tested it, it was not importatnt for the application I was doing. The testing app was very simple, while all the libraries has the common encode() method (mostly static), I just loaded a local image file and used its BitmapData as an imput into the encode() method

  4. BlooDHounD September 27, 2010 17:45
  5. […] now you should get binary request not much bigger than length of the same request containing PNG encoded image bytes. On PHP side use gzuncompress() to get raw […]

  6. […] Quick tip: Fastest ActionScript PNGEncoder (update) at Jozef Chúťka’s blog http://blog.yoz.sk/2010/06/quick-tip-fastest-actionscript-pngencoder/ […]

Leave a comment

Please be polite and on topic. Your e-mail will never be published.