从 ARGB 字符串创建位图(在 actionscript-3 中)?

发布于 2024-08-27 11:29:46 字数 171 浏览 2 评论 0原文

在actionscript 3中,将数据(不是来自文件)转储到位图中进行显示的最快方法是什么?

我让它与 setPixels 和彩色矩形一起使用,但这太慢/效率太低。

有没有办法加载原始字节或劫持加载器类以放入自定义加载器数据?

什么是最好/最快的——我应该开始编写字节编码器吗?

in actionscript 3, what's the fastest way to dump your data (not from a file) into a bitmap for display?

I have it working with setPixels and colored rects but that's way too slow/inefficient.

Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?

What would be the best/fastest--should I start writing a byte encoder?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

筑梦 2024-09-03 11:29:46

您可以快速将 ByteArray 中的数据复制到使用 位图 /livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BitmapData.html#setPixels()" rel="nofollow noreferrer">setPixels()。即使您需要事先对数据进行一些整理,它也应该比单独设置每个像素要快得多。

You can quickly copy data from a ByteArray into a Bitmap using setPixels(). Even if you need to do some wrangling of your data beforehand, it should be way faster than setting each pixel individually.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文