ByteScout Image To Video SDK - C# - Add Image From Buffer - ByteScout

ByteScout Image To Video SDK – C# – Add Image From Buffer

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – C# – Add Image From Buffer

How to add image from buffer in C# using ByteScout Image To Video SDK

How to add image from buffer in C#

The sample source codes on this page shows how to add image from buffer in C#. Want to add image from buffer in your C# app? ByteScout Image To Video SDK is designed for it. ByteScout Image To Video SDK is the SDK that is designed to generate video slideshow with 100+ 2d and 3D transition effects. Can generate WMV, AVI, WEBM video file with adjustable quality, framerate, output video size.

C# code samples for C# developers help to speed up coding of your application when using ByteScout Image To Video SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Use of ByteScout Image To Video SDK in C# is also explained in the documentation included along with the product.

Trial version of ByteScout Image To Video SDK can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

Try ByteScout Image To Video SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using System.Diagnostics; using BytescoutImageToVideo; namespace AddImageFromBuffer { class Program { static void Main(string[] args) { try { Console.WriteLine("Converting JPG slides to video, please wait..."); // Create BytescoutImageToVideoLib.ImageToVideo object instance ImageToVideo converter = new ImageToVideo(); // Activate the component converter.RegistrationName = "demo"; converter.RegistrationKey = "demo"; // Add images from memory and set the duration for every slide: Slide slide; byte[] bytes; bytes = System.IO.File.ReadAllBytes("..\\..\\..\\..\\slide1.jpg"); slide = converter.AddImageFromBuffer(bytes); slide.Duration = 3000; bytes = System.IO.File.ReadAllBytes("..\\..\\..\\..\\slide3.jpg"); slide = converter.AddImageFromBuffer(bytes); slide.Duration = 3000; bytes = System.IO.File.ReadAllBytes("..\\..\\..\\..\\slide3.jpg"); slide = converter.AddImageFromBuffer(bytes); slide.Duration = 3000; // Set output video size converter.OutputWidth = 640; converter.OutputHeight = 480; // Set output video file name converter.OutputVideoFileName = "result.wmv"; // Run the conversion converter.RunAndWait(); // Release resources System.Runtime.InteropServices.Marshal.ReleaseComObject(converter); converter = null; Console.WriteLine("Done. Press any key to continue.."); Console.ReadKey(); // Open the result video file in default media player Process.Start("result.wmv"); } catch (Exception e) { Console.WriteLine("Error: " + e.ToString()); Console.WriteLine("\nPress any key to exit"); Console.ReadKey(); } } } }

Try ByteScout Image To Video SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

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

Explore ByteScout Image To Video SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next