Fix Image.fromBitmapData (resolves Assets.getBitmapData from SWF issue)

This commit is contained in:
Joshua Granick
2015-09-23 19:49:17 -07:00
parent 853c562a01
commit 5154fd15fa

View File

@@ -464,9 +464,13 @@ class Image {
public static function fromBitmapData (bitmapData:#if flash BitmapData #else Dynamic #end):Image {
if (bitmapData == null) return null;
#if flash
var buffer = new ImageBuffer (null, bitmapData.width, bitmapData.height);
buffer.__srcBitmapData = bitmapData;
return new Image (buffer);
#else
return bitmapData.image;
#end
}