public Program() { var NgMaps = JsonMapClasses.LoadMapJson(@"C:\Users\Mikhail\Documents\GitHub\js\ng-map\map-myselfasiam.json"); var renderer = new NgMapAnimationRenderer() { NgMaps = NgMaps, FullResImageFolder = @"C:\Users\Mikhail\Documents\GitHub\js\ng-map", Commands = @"world europe italy italy-center toscana FINISH-POINT:37.6570485519591,26.6666666666667,Pisa", FinishImageFilename = @"C:\Users\Mikhail\Documents\GitHub\js\ng-map\pisa.jpg", OutputFolder = @"C:\Users\Mikhail\Documents\GitHub\js\ng-map\___animtest", OutputWidth = 1280, OutputHeight = 720, ZoomFactor = 2.5, ZoomFactorFinish = 5, ZoomToCenter = false, FramesEachMap = 20, FramesFadeTransition = 10, FramesHoldLastImage = 30 }; renderer.Render(); }
private void btnRender_Click(object sender, EventArgs e) { var renderer = new NgMapAnimationRenderer() { NgMaps = NgMaps, FullResImageFolder = config.FullResImageFolder, Commands = config.Commands, FinishImageFilename = FinishImageFilename, OutputFolder = txtOutputFolder.Text, OutputWidth = config.OutputWidth, OutputHeight = config.OutputHeight, ZoomFactor = config.ZoomFactor, ZoomFactorFinish = config.ZoomFactorFinish, ZoomToCenter = config.ZoomToCenter, FramesEachMap = config.FramesEachMap, FramesFadeTransition = config.FramesFadeTransition, FramesHoldFirstFrame = config.FramesHoldFirstFrame, FramesHoldLastImage = config.FramesHoldLastImage, OffsetX = config.OffsetX, OffsetY = config.OffsetY, Reverse = config.Reverse, }; renderer.OnProgress += (status) => { InvokeOrNot_IDontGiveAShit_JustDoIt(() => { lblStatus.Text = status; }); }; new Thread(() => { renderer.Render(); ProgUtils.OpenVirtualDubForImgSequence(renderer.FirstFrameFilename); }).Start(); }