private void StartConversion(string outputMpeg, string audioFilePath, int lengthInSecondsBetweenPhotos, List <string> photoList) { LibMPlayerCommon.SlideShow a = new LibMPlayerCommon.SlideShow(); List <LibMPlayerCommon.SlideShowInfo> b = new List <LibMPlayerCommon.SlideShowInfo>(); var options = LibMPlayerCommon.SlideShowEffect.Flip | LibMPlayerCommon.SlideShowEffect.Moire | LibMPlayerCommon.SlideShowEffect.Normal | LibMPlayerCommon.SlideShowEffect.Pixelate | LibMPlayerCommon.SlideShowEffect.RandomJitter | LibMPlayerCommon.SlideShowEffect.Swirl | LibMPlayerCommon.SlideShowEffect.TimeWarp | LibMPlayerCommon.SlideShowEffect.Water; // Add each photo in the list with a random picture change effect. foreach (string filePath in photoList) { if (System.IO.File.Exists(filePath)) { var matching = Enum.GetValues(typeof(LibMPlayerCommon.SlideShowEffect)) .Cast <LibMPlayerCommon.SlideShowEffect>() .Where(c => (options & c) == c) .ToArray(); LibMPlayerCommon.SlideShowEffect randomEffect = matching[new Random().Next(matching.Length)]; b.Add(new LibMPlayerCommon.SlideShowInfo(filePath, randomEffect)); } } a.CreateSlideShow(b, outputMpeg, audioFilePath, lengthInSecondsBetweenPhotos); }
public void Test1() { 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.TimeWarp)); b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg", LibMPlayerCommon.SlideShowEffect.Moire)); b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg", LibMPlayerCommon.SlideShowEffect.Water)); b.Add(new LibMPlayerCommon.SlideShowInfo(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg", LibMPlayerCommon.SlideShowEffect.RandomJitter)); a.CreateSlideShow(b, @"C:\Documents and Settings\Peter\Desktop\helloworld.mpg", @"C:\Documents and Settings\All Users\Documents\My Music\Magnatune Compilation\Rock\16. TranceVision_ Alpha.mp3", 5); }
public void Test1() { var a = new LibMPlayerCommon.SlideShow(); var b = new List<LibMPlayerCommon.SlideShowInfo>(); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "1014298_10153309773648441_4068913891654803342_n.jpg"), LibMPlayerCommon.SlideShowEffect.TimeWarp)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "10338701_10152519957416197_8977706802583474488_n.jpg"), LibMPlayerCommon.SlideShowEffect.Moire)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "11204921_10153266349078441_6239651282630925977_n.jpg"), LibMPlayerCommon.SlideShowEffect.Water)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "12038280_10153157463458441_1902212361551718770_n.jpg"), LibMPlayerCommon.SlideShowEffect.RandomJitter)); a.CreateSlideShow(b, Path.Combine(GlobalVariables.BasePath, "helloworld.mpg"), @"C:\Documents and Settings\All Users\Documents\My Music\Magnatune Compilation\Rock\16. TranceVision_ Alpha.mp3", 5); }
public void Test1() { var a = new LibMPlayerCommon.SlideShow(); var b = new List <LibMPlayerCommon.SlideShowInfo>(); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "1014298_10153309773648441_4068913891654803342_n.jpg"), LibMPlayerCommon.SlideShowEffect.TimeWarp)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "10338701_10152519957416197_8977706802583474488_n.jpg"), LibMPlayerCommon.SlideShowEffect.Moire)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "11204921_10153266349078441_6239651282630925977_n.jpg"), LibMPlayerCommon.SlideShowEffect.Water)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "12038280_10153157463458441_1902212361551718770_n.jpg"), LibMPlayerCommon.SlideShowEffect.RandomJitter)); a.CreateSlideShow(b, Path.Combine(GlobalVariables.BasePath, "helloworld.mpg"), @"C:\Documents and Settings\All Users\Documents\My Music\Magnatune Compilation\Rock\16. TranceVision_ Alpha.mp3", 5); }
public async Task Async_Test1() { var a = new LibMPlayerCommon.SlideShow(); var b = new List <LibMPlayerCommon.SlideShowInfo> (); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "1014298_10153309773648441_4068913891654803342_n.jpg"), LibMPlayerCommon.SlideShowEffect.TimeWarp)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "10338701_10152519957416197_8977706802583474488_n.jpg"), LibMPlayerCommon.SlideShowEffect.Moire)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "11204921_10153266349078441_6239651282630925977_n.jpg"), LibMPlayerCommon.SlideShowEffect.Water)); b.Add(new LibMPlayerCommon.SlideShowInfo(Path.Combine(GlobalVariables.BasePath, "12038280_10153157463458441_1902212361551718770_n.jpg"), LibMPlayerCommon.SlideShowEffect.RandomJitter)); await a.CreateSlideShowAsync(b, Path.Combine(GlobalVariables.BasePath, "helloworld_async_test.mpg"), Path.Combine(GlobalVariables.BasePath, @"Ghost_k_-_Stop_(blue_mix).mp3"), 5); }
private void StartConversion(string outputMpeg, string audioFilePath, int lengthInSecondsBetweenPhotos, List<string> photoList) { LibMPlayerCommon.SlideShow a = new LibMPlayerCommon.SlideShow(); List<LibMPlayerCommon.SlideShowInfo> b = new List<LibMPlayerCommon.SlideShowInfo>(); var options = LibMPlayerCommon.SlideShowEffect.Flip | LibMPlayerCommon.SlideShowEffect.Moire | LibMPlayerCommon.SlideShowEffect.Normal | LibMPlayerCommon.SlideShowEffect.Pixelate | LibMPlayerCommon.SlideShowEffect.RandomJitter | LibMPlayerCommon.SlideShowEffect.Swirl | LibMPlayerCommon.SlideShowEffect.TimeWarp | LibMPlayerCommon.SlideShowEffect.Water; // Add each photo in the list with a random picture change effect. foreach (string filePath in photoList) { if (System.IO.File.Exists(filePath)) { var matching = Enum.GetValues(typeof(LibMPlayerCommon.SlideShowEffect)) .Cast<LibMPlayerCommon.SlideShowEffect>() .Where(c => (options & c) == c) .ToArray(); LibMPlayerCommon.SlideShowEffect randomEffect = matching[new Random().Next(matching.Length)]; b.Add(new LibMPlayerCommon.SlideShowInfo(filePath, randomEffect)); } } a.CreateSlideShow(b , outputMpeg, audioFilePath, lengthInSecondsBetweenPhotos); }