public static void ExtractSnaphots(Settings settings, String path, List <Tuple <CardInfo, String> > allEntries, InfoProgress progress) { foreach (var entry in allEntries) { if (progress.Cancelled) { break; } progress.ProcessedSteps(1); var cardInfoNameTuple = entry; var cardInfo = cardInfoNameTuple.Item1; if (!cardInfo.HasImage()) { continue; } // create file at given path String outputSnapshotFilename = cardInfoNameTuple.Item2; String outputSnapshotFilepath = path + Path.DirectorySeparatorChar + outputSnapshotFilename; // get file with snapshot information -> video UtilsInputFiles.FileDesc videoFileDesc = cardInfo.episodeInfo.VideoFileDesc; // extract image double scaling = UtilsVideo.GetMaxScalingByStreamInfo(cardInfo.episodeInfo.VideoStreamInfo, settings.RescaleWidth, settings.RescaleHeight, settings.RescaleMode); double timeStamp = UtilsCommon.GetMiddleTime(cardInfo); UtilsImage.GetImage(videoFileDesc.filename, timeStamp, outputSnapshotFilepath, scaling); } }