我正在通过WCF get调用获取存储在SQL中的PNG图像。该图像被编码为base64字符串并传递给我的AS3代码。我需要从数据中提取图像并将其显示在场景中。
除其他事项外,我也尝试过这个...Actionscript 3:将bytearray转换为PNG并在场景中显示
var imgArray:ByteArray = Base64.decodeToByteArray(responseXML.ImageObject);
var myRect:Rectangle = new Rectangle(100,100,200,200);
var bmd:BitmapData = new BitmapData(200,200,true,0xAAAAAAAA);
bmd.setPixels(myRect, imgArray);
var image:Bitmap = new Bitmap(bmd,"auto",true);
this.addChild(image);
,但无济于事。
帮助!
我没有收到错误。我只是没有得到我的舞台上的形象。我解决了这个问题。解决方案如下。 – KSK