ByteScout Image To Video SDK - .NET Core - Generate Slide Show - ByteScout

ByteScout Image To Video SDK – .NET Core – Generate Slide Show

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – .NET Core – Generate Slide Show

How to generate slide show in .NET Core and ByteScout Image To Video SDK

How to code in .NET Core to generate slide show with this step-by-step tutorial

Generate slide show is easy to implement in .NET Core if you use these source codes below. ByteScout Image To Video SDK is the library for conversion of images into video slideshow. Provides built-in support for more than hundred of 2D and 3D transition effects. Output formats supported are AVI,WMV and WEBM video files. You may adjust output video size, quality, framerate and add audio. It can generate slide show in .NET Core.

This code snippet below for ByteScout Image To Video SDK works best when you need to quickly generate slide show in your .NET Core application. In your .NET Core project or application you may simply copy & paste the code and then run your app! Implementing .NET Core application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Trial version of ByteScout Image To Video SDK is available for free. Source code samples are included to help you with your .NET Core app.

Try it today: Get 60 Day Free Trial or sign up for Web API

NetCoreExample.csproj
      
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp2.1</TargetFramework> <StartupObject>NetCoreExample.Program</StartupObject> </PropertyGroup> <ItemGroup> <None Update="slide1.jpg"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> <None Update="slide2.jpg"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> <None Update="slide3.jpg"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> </ItemGroup> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

NetCoreExample.sln
      
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28010.2046 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCoreExample", "NetCoreExample.csproj", "{84CBDE72-A4DD-405D-8033-ED59361CE926}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {84CBDE72-A4DD-405D-8033-ED59361CE926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {84CBDE72-A4DD-405D-8033-ED59361CE926}.Debug|Any CPU.Build.0 = Debug|Any CPU {84CBDE72-A4DD-405D-8033-ED59361CE926}.Release|Any CPU.ActiveCfg = Release|Any CPU {84CBDE72-A4DD-405D-8033-ED59361CE926}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4AAF333D-20BB-4420-B6BF-E8BEC84CCEC5} EndGlobalSection EndGlobal

Try it today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using System.Reflection; namespace NetCoreExample { /// <summary> /// This example demonstrates the use of "ImageToVideo" ActiveX object from .NET Core application using the reflection. /// </summary> class Program { static void Main(string[] args) { // Create an instance of BytescoutImageToVideo.ImageToVideo ActiveX object object converter = Activator.CreateInstance(Type.GetTypeFromProgID("BytescoutImageToVideo.ImageToVideo", true)); // Activate the component SetProperty(converter, "RegistrationName", "demo"); SetProperty(converter, "RegistrationKey", "demo"); // Get Slides collection object slides = GetProperty(converter, "Slides"); // Set default "in" effect for slides (you can also set effects for each slide separately) SetProperty(slides, "DefaultSlideInEffect", 1); // 1 - "Fade-in" effect\ // Set default "in" effect duration (you can also set it for each slide separately) SetProperty(slides, "DefaultSlideInEffectDuration", 500); // Add slides and set durations object slide1 = InvokeMethod(converter, "AddImageFromFileName", new object[] { @".\slide1.jpg" }); SetProperty(slide1, "Duration", 3000); object slide2 = InvokeMethod(converter, "AddImageFromFileName", new object[] { @".\slide2.jpg" }); SetProperty(slide2, "Duration", 3000); object slide3 = InvokeMethod(converter, "AddImageFromFileName", new object[] { @".\slide3.jpg" }); SetProperty(slide3, "Duration", 3000); // Set output video size SetProperty(converter, "OutputWidth", 640); SetProperty(converter, "OutputHeight", 480); // Set output video file name SetProperty(converter, "OutputVideoFileName", "result.wmv"); // Run the conversion InvokeMethod(converter, "RunAndWait", null); } static void SetProperty(object target, string propertyName, object value) { target.GetType().InvokeMember(propertyName, BindingFlags.SetProperty, null, target, new object[] { value }); } static object GetProperty(object target, string propertyName) { return target.GetType().InvokeMember(propertyName, BindingFlags.GetProperty, null, target, null); } static object InvokeMethod(object target, string methodName, object[] parameters) { return target.GetType().InvokeMember(methodName, BindingFlags.InvokeMethod, null, target, parameters); } } }

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout Image To Video SDK page

Explore ByteScout Image To Video SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next