2

I have swf file's that's contains 2D images (here one of them: http://mapviewer.ru/img/tramvay/depo_d.swf )

I need draw this image (like seen in my browser), to bitmap.

Maybe i need convert this file to image (png, jpg)? No matter how, but it should be done programmatically.

Updated

BOBUK
  • 75
  • 1
  • 8
  • Maybe someone will find something much better, but here is a solution: Open target page inside a browser control in your application, then do a screenshot of the page once it loaded and save it as an image. – glautrou Aug 05 '13 at 11:51
  • http://stackoverflow.com/questions/5049122/capture-the-screen-shot-using-net – Tim S. Aug 05 '13 at 11:52
  • i'm just try to search some information about working c# with swf, but all that i find was a decompile actionscript from swf, but anything about images. P.S. I expect not solve for my problem from stackoverflow, i'm just expect advice of using some lib or some way to solve this problem. – BOBUK Aug 05 '13 at 11:55

2 Answers2

2

Have you tried to look at this library ?

Etienne Arthur
  • 680
  • 1
  • 9
  • 17
0

There are no embedded images inside the SWF file, only Vector shapes, which means you would need to both parse the SWF and render the data that is inside, so taking a screenshot of it is probably your best option. There are a lot of ways of doing this, but you could simply load the Flash Active-x in your application and take a screenshot. Here's how to load the SWF : Displaying Flash content in a C# WinForms application

Community
  • 1
  • 1
  • thank's, but how it faster will be? I don't think that it will be enough. Because this swf using like an icon on map. And service generate map tiles. – BOBUK Aug 05 '13 at 12:25
  • Well this would be pretty slow, you should first create a program that converts your SWFs to PNGs or JPGs and then use those in your app. – Fred Deschenes Aug 05 '13 at 12:41