将 SWF 转换为 PNG

Convert SWF to PNG(将 SWF 转换为 PNG)
本文介绍了将 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Encryption in JavaScript and decryption with PHP(JavaScript 加密和 PHP 解密)
Best solution to protect PHP code without encryption(无需加密即可保护 PHP 代码的最佳解决方案)
PHP AES encrypt / decrypt(PHP AES 加密/解密)
Upgrading my encryption library from Mcrypt to OpenSSL(将我的加密库从 Mcrypt 升级到 OpenSSL)
How to add/remove PKCS7 padding from an AES encrypted string?(如何从 AES 加密字符串中添加/删除 PKCS7 填充?)
How do I upgrade from PHP 7.0 to 7.3 on google cloud platform?(如何在谷歌云平台上从 PHP 7.0 升级到 7.3?)