How to convert from Flash SWF files to JPG image files?

We have just purchased Flash to Image Converter Command Line software.

We need code sample to call SWF to JPG conversion from dotnet service.
Presently swf2img2.exe takes long time to convert SWF to JPG frames
as compared to manually converting from command line using swf2img.exe.

Please suggest.
Customer
--------------------------------------------------------
I need to take a .swf Flash file, ideally from a URL (but I can read the file from disk also) and create an image preview of it (png, gif or jpeg is fine).

I am using Adobe Coldfusion 8 so I'm looking for a Java solution. I need to get the first frame of the Flash movie only.

Many thanks in advance.

EDIT: I need to do this on the server in Java/CF at runtime - it's got to be automatic - I'm not looking for screen-grab software! 🙂

Customer
--------------------------------------------------------

image
Thanks for your message, "swf2img2.exe" and "swf2img.exe" are using two different technologies to convert SWF files to JPEG files, you can choose either one according to your test.

You can use "VeryPDFComRunCmd COM Component" to call "swf2img2.exe" or "swf2img.exe" from dotnet service, please refer to detailed information about "VeryPDFComRunCmd COM Component" from following web pages,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

The following is a C# example source code to convert SWF files to Image files from C# code, you can run the conversion from Administrator user account to avoid the permission restrictions,

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using VeryPDFCom;

using System.IO;

 

namespace WindowsFormsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            string appPath = Path.GetDirectoryName(Application.ExecutablePath);

            string strExeFile = "D:\\downloads\\VeryPDFComRunCmd\\swf2img\\swf2img2.exe";

            string strInFile = "D:\\downloads\\VeryPDFComRunCmd\\swf2img\\colortest.swf";

            string strOutFile = "D:\\downloads\\VeryPDFComRunCmd\\swf2img\\colortest.jpg";

 

            string strCmd = "\"" + strExeFile + "\" \"" + strInFile + "\" \"" + strOutFile + "\"";

 

            System.Type VeryPDFType = System.Type.GetTypeFromProgID("VeryPDFCom.RunCmd");

            VeryPDFCom.RunCmd VeryPDFCom = (VeryPDFCom.RunCmd)System.Activator.CreateInstance(VeryPDFType);

            string strReturn = VeryPDFCom.RunCmd2(strCmd, 1);

            MessageBox.Show("Return: " + strReturn);

        }

    }

}

 

You need insert "VeryPDFCom" into C# project in order to use "VeryPDFCom.RunCmd",

 

image

 

image

VeryPDF

---------------------------------------------------------

We have purchased a swf2image command line server license.
we are able to call the swf2img2 from dot net code but for Arabic text it's generating white patches.Please help on it how to resolve the Arabic text problem on jpg/gif.

we are using -engine 0 -res 72.

We also tried using swf2img but no success it's generating black jpg/gif with license key.

Please help us to call swf2img using dot net

If i try it manually using swf2img using command line then it generates jpg/gif properly with Arabic text on it. I will be highly appreciate for your help to resolve the Arabic issue.

Thanks,
Customer
---------------------------------------------------------

This problem seems caused by permission problem when you run the conversion from default SYSTEM or Local System User account, you need run the conversion from administrator user account, this will solve the problem to you.

You can use "VeryPDFComRunCmd COM Component" to run "swf2img2.exe" from administrator user account easily, the following is a C# source code to run swf2img2.exe with "-engine 0" option,

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using VeryPDFCom;

using System.IO;

 

namespace WindowsFormsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            string appPath = Path.GetDirectoryName(Application.ExecutablePath);

            string strExeFile = "D:\\downloads\\VeryPDFComRunCmd\\swf2img\\swf2img2.exe";

            string strInFile = "D:\\downloads\\VeryPDFComRunCmd\\swf2img\\colortest.swf";

            string strOutFile = "D:\\downloads\\VeryPDFComRunCmd\\swf2img\\colortest.jpg";

 

            string strCmd = "\"" + strExeFile + "\" -engine 0 \"" + strInFile + "\" \"" + strOutFile + "\"";

 

            System.Type VeryPDFType = System.Type.GetTypeFromProgID("VeryPDFCom.RunCmd");

            VeryPDFCom.RunCmd VeryPDFCom = (VeryPDFCom.RunCmd)System.Activator.CreateInstance(VeryPDFType);

            string strReturn = VeryPDFCom.RunCmd2(strCmd, 1);

            MessageBox.Show("Return: " + strReturn);

        }

    }

}

 

Please notice, you need set "VeryPDFComRunCmd COM Component" run inside an interactive user account instead of default SYSTEM or Local System user account.

 

 

 

If you run swf2img2.exe from Administrator user account, all permission problems will be solved completely.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in Flash to Animated GIF Converter and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!