public static API_AForge_Video add_Image(this API_AForge_Video aforgeVideo, Bitmap image) { try { if (image.isNull()) { return(aforgeVideo); } if (aforgeVideo.PathToAviVideo.isNull()) { aforgeVideo.newVideo(); } if (image.isNull()) { return(aforgeVideo); } if (image.Width.neq(aforgeVideo.VideoWidth).or( image.Height.neq(aforgeVideo.VideoHeight))) { image = image.resize(aforgeVideo.VideoWidth, aforgeVideo.VideoHeight); } aforgeVideo.VideoWriter.AddFrame(image); } catch (Exception ex) { ex.log("[API_AForge_Video] in add_Image"); } return(aforgeVideo); }
public static Bitmap capture(this API_AForge_Video aforgeVideo, Control staControl) { return((Bitmap)staControl.invokeOnThread( () => aforgeVideo.Cropper.capture(aforgeVideo.Desktop_Capture_Top, aforgeVideo.Desktop_Capture_Left, aforgeVideo.Desktop_Capture_Width, aforgeVideo.Desktop_Capture_Height))); }
public static API_AForge_Video add_Bitmaps(this API_AForge_Video aforgeVideo, List <Bitmap> bitmaps) { foreach (var bitmap in bitmaps) { aforgeVideo.add_Bitmap(bitmap); } return(aforgeVideo); }
public static API_AForge_Video add_Images(this API_AForge_Video aforgeVideo, List <string> pathToImages) { foreach (var pathToImage in pathToImages) { aforgeVideo.add_Image(pathToImage); } return(aforgeVideo); }
public static string createVideo(this API_AForge_Video aforgeVideo, List <string> pathToImages) { "Creating Video with {0} images".debug(pathToImages.size()); aforgeVideo.newVideo(); aforgeVideo.add_Images(pathToImages); aforgeVideo.saveAndClose(); "Created Video: {0}".info(aforgeVideo.PathToAviVideo); return(aforgeVideo.PathToAviVideo); }
public static string createVideo(this API_AForge_Video aforgeVideo, List <Bitmap> bitmaps) { // show.info(bitmaps); aforgeVideo.newVideo(); aforgeVideo.add_Bitmaps(bitmaps); aforgeVideo.saveAndClose(); "Created Video: {0}".info(aforgeVideo.PathToAviVideo); return(aforgeVideo.PathToAviVideo); }
public ascx_MovieEditor() { FrameViewer_Panel = this; AForge_Video = new API_AForge_Video(); AForge_Video.FrameRate = 3; AForge_Video.FrameCaptureDelay = 10; AForge_Video.AddDuplicateFrames = false; OnImageDeleteAlsoDeleteFromDisk = false; ViewMultipleSelectedImages = true; }
public static string createAndPlay(this VideoSourcePlayer videoPlayer, List <string> pathToImages) { "in VideoSourcePlayer createAndPlay, creating a video from {0} WPF images".info(pathToImages.size()); var aforgeVideo = new API_AForge_Video(); aforgeVideo.add_Images(pathToImages); aforgeVideo.saveAndClose(); videoPlayer.play(aforgeVideo.PathToAviVideo); return(aforgeVideo.PathToAviVideo); }
public static API_AForge_Video frameCaptureDelay(this API_AForge_Video aforgeVideo) { aforgeVideo.sleep(aforgeVideo.FrameCaptureDelay); return(aforgeVideo); }
public static API_AForge_Video add_Bitmap(this API_AForge_Video aforgeVideo, Bitmap bitmap) { aforgeVideo.add_Image(bitmap); return(aforgeVideo); }
public static API_AForge_Video add_Image(this API_AForge_Video aforgeVideo, string pathToImage) { aforgeVideo.add_Image(Misc_ExtensionMethods.bitmap(pathToImage)); // using the extension methods creates a weird conflic with the other bitmap<T>() where T : Control return(aforgeVideo); }