Convert SWF to 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 SWF 转换为 PNG
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何替换eregi() 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
