将 SWF 转换为 PNG [英] Convert SWF to PNG

查看:58
本文介绍了将 SWF 转换为 PNG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够获取 1 帧 SWF 文件并通过 PHP 将其转换为 PNG.我可以使用命令行工具来完成这项工作.

I'd like to be able to take a 1-frame SWF file and convert it to PNG through PHP. I'm okay with using command-line tools to get this done.

我该怎么做呢?我找到了 一个 ActiveX 库,但这似乎层数太多了.我还看到 Gnash 似乎有一个 PNG 输出类,但我想不通了解如何在不进行一些我自己的深度编码的情况下从命令行获得它.还有其他聪明的解决方案吗?谢谢!

How could I go about doing this? I found an ActiveX library, but that seems like one too many layers. I also see that Gnash seems to have a PNG output class, but I can't figure out how to get to that from the command line without doing some deep coding of my own. Are there any other clever solutions available? Thanks!

澄清一下,这不是我只想做一次的一次性任务.我希望能够让 PHP 脚本根据命令执行此任务.谢谢!

To clarify, this is not a one-time task I just want to be able to do once. I'd like to be able to have a PHP script perform this task on command. Thanks!

另一个还有一个澄清.这不是用户在 Flash 中进行绘图的情况.我正在下载原始 1 帧 SWF 文件,并希望保存 PNG 副本以减少下载时间.这样的任务可行吗?再次感谢!

Another One more clarification. This is not a situation in which, say, a user makes a drawing in Flash. I am downloading raw 1-frame SWF files, and want to save PNG copies in order to reduce download time. Is such a task possible? Thanks again!

推荐答案

您可以使用 swftools.
swfrender file.swf -X pixelsize -Y pixelsize -o output.png

如果仅指定了 -X -Y 参数之间的一个,则遵守比例

If only one between -X -Y parameter is specified then proportions are respected

这篇关于将 SWF 转换为 PNG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆