ByteScout Image To Video SDK API ReferenceByteScout Image To Video SDK

Bytescout Image To Video ActiveX API

Bytescout Image To Video ActiveX object provides set of methods and properties to convert SWF into video (WMV or AVI with sound) or image (PNG, BMP) from Visual Basic 6, C#, VB.NET, ASP.NET programming languages. Simple and easy to use!

General Information

Files: BytescoutImageToVideo.dll and BytescoutImageToVideoFilter.dll

.NET assembly: BytescoutImageToVideoLib.dll

ActiveX/.NET object interface: BytescoutImageToVideo.ImageToVideo

BytescoutImageToVideo.IImageToVideo object interface.

  • Property Version As String: returns string with version of the SDK;

  • Property RegistrationName As String: set this property to your registration name when using FULL version of the SDK;

  • Property RegistrationKey As String: set this property to your serial key when using FULL version of the SDK;

  • Method SetLogFile(fileName As String): sets filename for the log to write the conversion log;

  • INPUT AND OUTPUT

  • Property OutputVideoFile As String: sets output video filename. You can set .AVI or .WMV filename;

  • Image To Video METHODS AND PROPERTIES

  • Property ConversionProgress As Long: reads current conversion progress (from 0 to 100);

  • Method SetProgressNotifyWindow (LONG_PTR hwnd, UINT message, LPARAM lParam): sets window for conversion progress indication callback event. See Advanced Examples | Conversion progress in GUI sample for more information.

  • Method Run: runs the conversion and exits immediately (you should call the .Stop() method to stop the conversion later);

  • Method RunAndWait: method runs the conversion and waits until the conversion is done;

  • Property IsRunning: returns the status of conversion: True if conversion is running, False if the conversion is not running;

  • Method Stop: stops the conversion (if the conversion has been started with .Run() method);

  • Property VideoCodecsCount AS Long: returns number of available video codecs installed on the current computer;

  • Method GetVideoCodecName(Index As Long): returns the name of the video codec by its index in the available video codecs list;

  • Property CurrentVideoCodec As Long: read or write the index of the currently selected codec in the list of available video codecs;

  • Property CurrentVideoCodecName As String: reads or writes current video codec name. If you want to set current video codec by its name (or part of the name, say, DivX) then you should use this property;

  • Property OutputWidth As Long: read or write output video width;

  • Property OutputHeight As Long: read or write output video height;

  • Property FPS As Float: read write FPS (frames per second) for the output video;

  • Method ShowVideoCodecSettingsDialog(OLE_HANDLE parent) As HRESULT: shows video codec settings dialog (for the currently selected AVI video codec);

  • SLIDES METHODS AND PROPERTIES

  • Property UseOutEffectForLastSlide As Bool: set True to apply OutEffect to the last slide;

  • Property UseInEffectForFirstSlide As Bool: set True to apply InEffect to the very first slide;

  • Property AutoFitImages As Bool: set to True to autofit images into the video width and height automatically;

  • Property KeepAspectRatio As Bool: set to True to keep aspect ratio when auto fitting images into video (if AutoFitImages = True);

  • Method AddImageFromFileName(fileName As String) As ISlide: adds new slide from image file and returns ISlide object to set properties for slide object;

  • Method AddImageFromBuffer(variant As Variant) as ISlide: adds new slide from image from in memory buffer and returns ISlide object to set properties for slide object;

  • Method AddImageFromFolder(folderName as String, recursivbe As Bool): adds slides from images in folder. To manipulate with new slides use .Slides property;

  • Method SetBackgroundColorRGB(R as Byte, G as Byte, B as Byte): sets background color for slideshow video;

  • Method SetBackgroundPictureFileName(fileName as String): sets background picture color for slideshow video;

  • Property Slides(slideIndex as Long): returns Slide object with given index;

  • AUDIO SETTINGS (for Image To Video conversion)

  • Property ExternalAudioTrackFromFileName As String: use this property to set the external audio track filename (.wav or .mp3) which will be merged in the output video automatically. Can be used in both SWFAnimation and SWFWithLiveData conversion modes (see .ConversionMode);

  • Read-only Property AudioCodecsCount As Long: returns number of available audio compression codecs installed on the current computer.

  • Method GetAudioCodecName(Index As Long) As String: returns name of the audio codec selected by the index.

  • Property CurrentAudioCodec As Long: set or get currently selected audio compression codec (which is used to compress audio in the captured video).

  • Property CurrentAudioCodecName As String: set or get currently selected audio compression codec using audio codec name (which is used to compress audio in the captured video).

  • Read-only Property AudioDeviceCount As Long: returns number of available audio devices installed on the current computer.

  • Method GetAudioDeviceName(Index As Long) As String: returns name of the audio device selected by the index.

  • Property CurrentAudioDevice As Long: set or get currently selected audio device (which is used to recird audio from in the captured video).

  • Property CurrentAudioDeviceName As String: set or get currently selected device line using audio line name (which is used to record audio from in the captured video).

  • Read-only Property AudioDeviceLinesCount As Long: returns number of available audio lines installed on the current computer.

  • Method GetAudioDeviceLineName(Index As Long) As String: returns name of the audio line selected by the index.

  • Property CurrentAudioDeviceLine As Long: set or get currently selected audio line (which is used to recird audio from in the captured video).

  • Property CurrentAudioDeviceLineName As String: set or get currently selected audio line using audio line name (which is used to record audio from in the captured video).

using System.Diagnostics;
using BytescoutImageToVideoLib;

namespace SlideEffects
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create BytescoutImageToVideoLib.ImageToVideo object instance
            ImageToVideo converter = new ImageToVideo();

            // Activate the component
            converter.RegistrationName = "demo";
            converter.RegistrationKey = "demo";

            // Add images and set slide durations and effects
            Slide slide;
            slide = (Slide) converter.AddImageFromFileName("..\\..\\..\\..\\slide1.jpg");
            slide.Duration = 3000; // 3000ms = 3s
            slide.VisualEffect = VisualEffectType.veGrayscale; // make the slide grayscale
            slide = (Slide) converter.AddImageFromFileName("..\\..\\..\\..\\slide2.jpg");
            slide.Duration = 3000;
            slide.VisualEffect = VisualEffectType.veSepia; // make the slide sepia
            slide = (Slide) converter.AddImageFromFileName("..\\..\\..\\..\\slide3.jpg");
            slide.Duration = 3000;
            slide.RotationAngle = RotationAngle.raRotate90; // rotate the slide 90 degrees.

            // Set output video size
            converter.OutputWidth = 400;
            converter.OutputHeight = 300;

            // Set output video file name
            converter.OutputVideoFileName = "result.wmv";

            // Run the conversion
            converter.RunAndWait();

            // Open the result video file in default media player
            Process.Start("result.wmv");
        }
    }
}