2

I have searched the depths of the internet for a solution but unfortunately all the posts discussing the issue are outdated and provide no solutions.

I need to be able to dynamically generate a screenshot from a SWF file and save it locally to the server. Some posts suggest the use of FFMPEG, but I don't think it supports the SWF format. Another suggested to use the Internet Explorer grabscreen function, but that's Windows only.

Any answers on how to do this are greatly appreciated.

4

2 に答える 2

2

If you own a server, you can install extension for PHP (http://php.net/manual/en/swf.setup.php) however, this is a little overkill for getting one frame.

Other solution is using this class: http://www.sephiroth.it/swfreader.php

Also, you can write your own parser, in this case refer to Adobes flasg format specification: http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf_file_format_spec_v10.pdf

于 2013-01-16T11:41:49.577 に答える
0

If I understand you correctly you need to generate an image on server side. Please look at the solution described here: http://techblog.floorplanner.com/post/20528549445/server-side-png-rendering-of-swf-images-using-gnash

I didn't try it myself but hopefully it will help. Also if it is possible to generate an image after the first user opens the swf and there is a possibility to change the code of the SWF, I'd recommend you to look at this article: http://www.flepstudio.org/forum/tutorials/507-swf-png-actionscript-3-0-bytearray-class.html

于 2013-01-16T11:40:12.907 に答える