1

I'm converting a swf file to png image using SWFtoImage tool in c#. I'm able to convert the file successfully, but the problem is transparency. The converted image contains a black background instead of transparent, as you can see in the attached image.

enter image description here

how can I fix this? since the tool fails to create a transparent image, is it possible in .net to manipulate on the converted png image and make its background transparent?

Current Code:

        //Namespace: BytescoutSWFToVideo;

        // Create an instance of SWFToVideo ActiveX object
        SWFToVideo converter = new SWFToVideo();

        // Register SWFToVideo
        converter.RegistrationName = "demo";
        converter.RegistrationKey = "demo";

        // set input SWF file
        converter.InputSWFFileName = @"D:\image2069.swf";

        // Enable trasparency
        converter.RGBAMode = true;

        // Extract all frames to .\Output sub-folder
        converter.ConvertAllToPNG(@"D:\Result\");

This is the swf file.

NaveenBhat
  • 3,248
  • 4
  • 35
  • 48

1 Answers1

3

I don't know much about SWFToImage. But the company's web site contains demo code with the following comment (translated to C#):

// Enable trasparency - set BEFORE setting input SWF filename
converter.RGBAMode = true;

So possibly you have to change the order of your statements.

Codo
  • 75,595
  • 17
  • 168
  • 206