Load and save WEBP images on Flash using FlashCC or faster ANEs

View the Project on GitHub soywiz/as3libwebp

Webp for as3

[Full Screen]


You can grab sample webp images to use here there:


package libwebp;
function DecodeWebp(webpByteArray:ByteArray):BitmapData;
function EncodeWebp(input:BitmapData, quality:Number):ByteArray;


It is compiled with 0.3.1 and supports lossy, lossless compression and alpha channel. No animations yet.

Due to flash's dynamic recompilation, the first time you decode a webp image will take a bit longer than usually, but on later calls it will be faster.


Webp for ActionScript3 come in two flavors:

You can run the SWC version in any webpage and AIR application, but it will run ~2x-5x slower than using an ANE.

Also there is a ANE that could be used on AIR for Windows and Android at this moment. iOS, linux and Mac ANEs will be available in a future version. For those platforms you can use the SWC version.