Home

SWF To Image library

SWF To Image screenshot (click to enlarge)


Subscribe to Our Bi-Monthly Newsletter (tips, new releases, specials):
 Subscribe in a reader
 PRODUCTS  |  DOWNLOAD  |  PURCHASE  |  SUPPORT  |  CONTACTS  |  TESTIMONIALS 

SWF To Image library

Download
You are not a developer but looking for ready-to-use application? Check SWF To Image GUI (freeware)

This example will teach you how to convert all SWF (flash) files in a folder into GIF images using SWF To Image library

A folder with SWF flash movies:

Folder with flash movies to convert

SWF To Image library is freeware. However you are welcome to purchase 12 months tech support for it and so support development of SWF To Image library.
12 Months Tech Support via e-mail for SWF To Image library ($95 USD)

The code below will find all flash (swf) files in a folder and then will convert them into GIF images with the same name and .jpg extension

' This example converts all SWF files in the folder into GIF image files
' Copy this script to the folder with SWF flash movies and run it
' Script will generate GIF image files using extracted frames from SWF

Set SWFToImage = CreateObject("SWFToImage.SWFToImageObject")

SWFToImage.InitLibrary "demo", "demo"

Dim WshShell, fs, f, fc, f1, tsFile
Set WshShell = WScript.CreateObject("WScript.Shell")

sCurrentFolder = WshShell.CurrentDirectory

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(sCurrentFolder) ' current directory
Set fc = f.Files
Set fs = Nothing

' converting SWF files to JPG image files
For Each f1 in fc
if UCase(Mid(f1.name, InstrRev(f1.name, ".") + 1)) = "SWF" then
SWFToImage.InputSWFFileName = f1.name
SWFToImage.FrameIndex = 1 ' number of frame to extract
SWFToImage.ImageOutputType = 1 ' set output image type to GIF (0 = BMP, 1 = JPG, 2=GIF)
SWFToImage.Execute
SWFToImage.SaveToFile Mid(f1.name, 1, Instr(f1.name, ".") - 1) & ".gif"
End If

Next

Set SWFToImage = nothing

The script code will convert every SWF file into GIF image in the same folder:

JPG  images in the folder

Download
You are not a developer but looking for ready-to-use application? Check SWF To Image GUI (freeware)
See also:

PRODUCTS  |  DOWNLOAD  |  PURCHASE  |  SUPPORT  |  CONTACTS  |  TESTIMONIALS  |  NEWS

Copyright © ByteScout, 2003-2009. Privacy Statement
Microsoft®, Windows®, Windows 2000®, Windows Server®, Windows Vista®, Internet Explorer®, .NET Framework®, ActiveX®, Visual Basic®, Visual C#®, ASP®, ASP.NET®, Excel®, PowerPoint®, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe®, Flash® and Acrobat® are registered trademarks of Adobe Systems, Incorporated. Mozilla®, Firefox® and the Mozilla and Firefox Logos are registered trademarks of the Mozilla Foundation. Other product names or brandnames used herein are for identification purposes only and might be trademarks or registered trademarks of their respective companies. We disclaim any and all rights to those marks.