swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Extract a list of files


From: Matthias Kramm
Subject: Re: [Swftools-common] Extract a list of files
Date: Sat, 26 Nov 2005 13:03:41 +0100
User-agent: Mutt/1.5.6i

On Sat, Nov 19, 2005 at 07:08:01PM +0100, Oleguer Vilella Mitjana wrote:
> I want to extract a list of photos. I know how can I do it one by one,
> but I've 100 files and I need a way to extract them together.

Try the python interface. The following script should do it:

-----------------------------------------------------------------------
#!/usr/bin/python

import SWF
import os

counter=1
for file in os.listdir("."):
    if file.lower().endswith("swf"):
        print "Extracting images from",file
        swf = SWF.load(file)
        for tag in swf.tags:
            if tag.isImage():
                tag.save("image"+str(counter)+".png")
                counter = counter + 1
-----------------------------------------------------------------------

HTH, Greetings,

Matthias







reply via email to

[Prev in Thread] Current Thread [Next in Thread]