How to convert SWF to Image in VBScript using SWF To Video SDK


The VBScript example shows how to convert SWF flash to image (PNG file) using Bytescout SWF To Video SDK for developers in Visual Basic Script (VBScript).

You can save this sample source code as Test.VBS file and run it in Explorer. SWF to Video SDK can be used under both x86 and x64 versions of Windows.
' Create an instance of SWFToVideo ActiveX object
Set converter = CreateObject("BytescoutSWFToVideo.SWFToVideo")
 
' Set debug log
'converter.SetLogFile "log.txt"
 
' Register SWFToVideo
converter.RegistrationName = "demo"
 
converter.RegistrationKey = "demo"
 
' uncomment to enable PNG with transparency
' converter.RGBAMode = true ' enable BEFORE setting InputSWFFileName property
 
' Set input SWF file
 
converter.InputSWFFileName = "SlideShowWithEffects.swf"
 
' Set output movie dimensions
converter.OutputWidth = 640
 
converter.OutputHeight = 480
 
converter.StartFrame = 5
 
converter.ConvertToPNG "output.png"
 
Set converter = Nothing

 


Sample Flash to image conversion:

 

Input SWF video - shapes.swfOutput PNG image file - result.png
Filed in: SWF To Video SDK