Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marchbold/af532b08f8e145bd6866 to your computer and use it in GitHub Desktop.
Save marchbold/af532b08f8e145bd6866 to your computer and use it in GitHub Desktop.
Loading a WebP file to a BitmapData
try
{
WebP.init( APPLICATION_KEY );
if (WebP.isSupported)
{
// Find a file packaged with the application
var file:File = File.applicationDirectory.resolvePath( "image.webp" );
var bd:BitmapData = WebP.service.loadWebPBitmapData( path.url );
}
}
catch (e:Error)
{
}
// com.distriqt.WebP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment