How to convert SWF to Image in Visual Basic .NET using SWF To Video SDK


The VB .NET sample code shows how to convert Flash movie (SWF) to image file (PNG) with Bytescout SWF To Video SDK for Visual Basic .NET developers.

SWF to Video SDK offers set of methods and properties to convert Flash to images.
Imports System.Diagnostics
Imports BytescoutSWFToVideoLib
 
 
Class Program
Friend Shared Sub Main(args As String())
 
' Create an instance of SWFToVideo ActiveX object
Dim z As New SWFToVideo()
Dim converter As New SWFToVideo()
 
' Set debug log
'converter.SetLogFile("log.txt");
 
' Register SWFToVideo
converter.RegistrationName = "demo"
converter.RegistrationKey = "demo"
 
 
' Enable trasparency - set BEFORE setting input SWF filename
converter.RGBAMode = True
 
' Set input SWF file
converter.InputSWFFileName = "Shapes.swf"
 
 
' Select 20th frame
converter.StartFrame = 20
converter.StopFrame = 20
 
' Run conversion
converter.ConvertToPNG("result.png")
 
' Open the result in default application
Process.Start("result.png")
 
End Sub
End Class

 


Sample SWF to PNG conversion:

 

Input SWF video - shapes.swfOutput PNG image file - result.png

 

Filed in: SWF To Video SDK