Skip to content
Peter Gill edited this page Apr 1, 2014 · 17 revisions

To use this class create a new instance. Also create a new list of SlideShowInfo. Add all images you want in the slide show to the SlideShowImage list then call the CreateSlideShow method of the SlideShow class.

If you do not want any audio then leave the audio parameter as an empty string.

For example you can create a slide show with the code shown below. This slide show will include four images, include a mp3 as background music, have a 15 second interval between images and will save a video called helloworld.avi.

This example requires mencoder.exe to be in the same working directory as your program.

C Sharp

 LibMPlayerCommon.SlideShow a = new LibMPlayerCommon.SlideShow();
 List<LibMPlayerCommon.SlideShowInfo> b = new  List<LibMPlayerCommon.SlideShowInfo>();
 
 b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg",  LibMPlayerCommon.SlideShowEffect.Swirl)); 
 b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg",  LibMPlayerCommon.SlideShowEffect.Normal)); 
 b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg",  LibMPlayerCommon.SlideShowEffect.Normal)); 
 b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg",  LibMPlayerCommon.SlideShowEffect.Normal)); 
 
 a.CreateSlideShow(b, @"C:\Documents and Settings\Peter\Desktop\helloworld.avi", @"C:\Documents and Settings\All Users\Documents\My Music\Magnatune Compilation\Rock\16. TranceVision_ Alpha.mp3", 15);

VB

Dim a As New LibMPlayerCommon.SlideShow()
Dim b As New List(Of LibMPlayerCommon.SlideShowInfo)()

b.Add(New LibMPlayerCommon.SlideShowInfo("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg", LibMPlayerCommon.SlideShowEffect.Swirl))
b.Add(New LibMPlayerCommon.SlideShowInfo("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg", LibMPlayerCommon.SlideShowEffect.Normal))
b.Add(New LibMPlayerCommon.SlideShowInfo("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg", LibMPlayerCommon.SlideShowEffect.Normal))
b.Add(New LibMPlayerCommon.SlideShowInfo("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg", LibMPlayerCommon.SlideShowEffect.Normal))

a.CreateSlideShow(b, "C:\Documents and Settings\Peter\Desktop\helloworld.avi", "C:\Documents and Settings\All Users\Documents\My Music\Magnatune Compilation\Rock\16. TranceVision_ Alpha.mp3", 15)
Clone this wiki locally