Created
May 12, 2015 07:42
-
-
Save marchbold/af532b08f8e145bd6866 to your computer and use it in GitHub Desktop.
Loading a WebP file to a BitmapData
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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