How to convert SWF to Image in Visual C# using SWF To Video SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

How to convert SWF to Image in Visual C# using SWF To Video SDK

  • Home
  • /
  • Articles
  • /
  • How to convert SWF to Image in Visual C# using SWF To Video SDK
This Visual C# example shows how to convert Flash movie (SWF) to image file (PNG) using Bytescout SWF To Video SDK for Visual C# developers.

The SDK is accessible from .NET applications to convert Flash to image files.

Imports System.Diagnostics
Imports BytescoutSWFToVideo

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 Flash to image conversion:

 

Input SWF video – shapes.swf Output PNG image file – result.png

Tutorials:

prev
next