谈到将ImageSnapshot成Flex的图像 [英] Turning an ImageSnapshot into an Image in Flex
本文介绍了谈到将ImageSnapshot成Flex的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Flex 3,我想拍摄图像快照像这样的:
Using Flex 3, I would like to take an image snapshot such as this:
var logoSnapshot:ImageSnapshot = ImageSnapshot.captureImage(logoContainer);
和把它变成一些图像类可以使用。我看到有一个名为数据的属性,即持有的字节数组,所以我想我的问题是:我如何采取被存储为ByteArray的图像,并将其转换成一些图像类可用于显示
and turn it into something that the Image class can use. I see that there is a property called "data", that holds a byteArray, so I guess my question is: How do I take an image that gets stored as a byteArray and convert it to something the Image class can use to display?
推荐答案
简单的实现应该工作:
var bm : Bitmap = new Bitmap(ImageSnapshot.captureBitmapData(logoContainer));
设置BM作为Image对象的来源。
Set "bm" as the source of your Image object.
这篇关于谈到将ImageSnapshot成Flex的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文