Actionscript 3 使用byteArray显示图像失败(未处理的IOErrorEvent:.text=Error#2124:加载的文件是未知类型)
问题:将byteArray用作Actionscript 3 使用byteArray显示图像失败(未处理的IOErrorEvent:.text=Error#2124:加载的文件是未知类型),actionscript-3,apache-flex,image-processing,bytearray,Actionscript 3,Apache Flex,Image Processing,Bytearray,问题:将byteArray用作源代码时无法显示jpeg图像 假设存在一个名为“card”的现有图像。。 以下是场景: 1.获取位图数据:var bitmapData:bitmapData=Bitmap(card.content)。bitmapData 2.get-byteArray:var-pixels:byteArray=bitmapData.getPixels(bitmapData.rect) 3.将byteArray附加到新图像:var-other:Image=new-Image();另一
源代码时无法显示jpeg图像
假设存在一个名为“card”的现有图像。
。
以下是场景:
1.获取位图数据:var bitmapData:bitmapData=Bitmap(card.content)。bitmapData
2.get-byteArray:var-pixels:byteArray=bitmapData.getPixels(bitmapData.rect)
3.将byteArray附加到新图像:var-other:Image=new-Image();另一个.source=像素。
(我还尝试使用另一种方法,但仍然无法工作:var-loader:loader=new-loader();loader.loader(像素);
)
加载程序。加载程序(像素)将抛出错误*错误为“未处理的IOErrorEvent:。text=error#2124”:加载的文件类型未知*请参阅以下链接