SWF To Image library - converting set of SWF flash movies into BMP image files - ByteScout

SWF To Image library – converting set of SWF flash movies into BMP image files

  • Home
  • /
  • Articles
  • /
  • SWF To Image library – converting set of SWF flash movies into BMP image files

 

This example will show you how to convert all SWF flash movies in the folder into BMP image files

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)

Code below will collect all SWF files in the folder and then convert all flash files into BMP images with the same name and .bmp extension

‘ This example converts all SWF files in the folder into BMP images
‘ Copy this script to the folder with SWF flash movies and run it
‘ Script will generate BMP 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 BMP 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.Execute
SWFToImage.SaveToFile Mid(f1.name, 1, Instr(f1.name, “.”) – 1) & “.bmp”
End If

Next

Set SWFToImage = nothing

The script code will generate BMP images in the same folder:

BMP images in the folder

Tutorials:

prev
next