Render Flash (SWF) frame as image (PDF,PNG,JPG)

后端 未结 3 1901
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-09 05:20

I would like to write a python script that takes a bunch of swf files and renders them to individual image files.

Each swf file has just one frame (text, pictures etc.)

3条回答
  •  孤独总比滥情好
    2021-02-09 06:14

    Sometimes SWFRender is stuck at very heavy files, especially when producing 300dpi+ images. In this case Gnash may help:

    gnash -s --screenshot last --screenshot-file output.png -1 -r1 input.swf
    

    here we dump a last frame of a movie to file output.png disabling sound processing and exiting after the frame is rendered. Also we can specify the scale factor here or use

    -j width -k height
    

    to specify the exact size of resulting image.

提交回复
热议问题