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 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); }