将每个帧渲染为单个图像(Render each frame as a single image)

编程入门 行业动态 更新时间:2024-10-26 12:31:54
将每个帧渲染为单个图像(Render each frame as a single image)

只是好奇,可以闪存每个帧并将其导出为图像? 在我的情况下,我想使用blitting为flashdevelop项目创建精灵图像。 当然,我知道有一个解决方案。 就像将每个形状复制并粘贴到像Photoshop这样的图像编辑器中,然后将它们转换为PNG的形状。 但我只是看到是否有更简单的方法。

Just curious, can flash take each frame and export it out as a image ? In my case, I want to create sprite images for a flashdevelop project using blitting. Of course I know there is a solution for this. like copy and paste each shape into a image editor such as photoshop and turn them into png's. But I am just seeing if there is a simpler means of doing so.

最满意答案

检查BitmapData.draw() 。 您可以侦听帧事件并以编程方式从Flash中提取位图(将舞台绘制到位图上,起泡,漂洗,重复)。 将其与PNG编码器结合使用,您可以非常轻松地自动完成整个过程。

Check out BitmapData.draw(). You can listen to frame events and programmatically spit out bitmaps from within Flash (draw the stage onto a bitmap, lather, rinse, repeat). Combine this with a PNG encoder and you can automate the entire process very easily.

更多推荐

本文发布于:2023-04-29 05:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1335265.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   Render   frame   single   image

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!