public void ReceiveScannedImage(IScannedImage scannedImage) { scannedImages.Add(scannedImage); pagesScanned++; totalPagesScanned++; OutputVerbose(ConsoleResources.ScannedPage, totalPagesScanned); }
public IEnumerable <int> MoveUp(IEnumerable <int> selection) { var newSelection = new int[selection.Count()]; int lowerBound = 0; int j = 0; foreach (int i in selection.OrderBy(x => x)) { if (i != lowerBound++) { IScannedImage img = Images[i]; Images.RemoveAt(i); Images.Insert(i - 1, img); img.MovedTo(i - 1); newSelection[j++] = i - 1; } else { newSelection[j++] = i; } } return(newSelection); }
public IEnumerable <int> MoveDown(IEnumerable <int> selection) { var newSelection = new int[selection.Count()]; int upperBound = Images.Count - 1; int j = 0; foreach (int i in selection.OrderByDescending(x => x)) { if (i != upperBound--) { IScannedImage img = Images[i]; Images.RemoveAt(i); Images.Insert(i + 1, img); img.MovedTo(i + 1); newSelection[j++] = i + 1; } else { newSelection[j++] = i; } } return(newSelection); }
private void AppendThumbnail(IScannedImage scannedImage) { thumbnailList1.AppendImage(scannedImage); UpdateToolbar(); }
public void ReceiveScannedImage(IScannedImage scannedImage) { Invoke(() => { imageList.Images.Add(scannedImage); AppendThumbnail(scannedImage); changeTracker.HasUnsavedChanges = true; Application.DoEvents(); }); }
public void ReceiveScannedImage(IScannedImage scannedImage) { imageList.Images.Add(scannedImage); AppendThumbnail(scannedImage); changeTracker.HasUnsavedChanges = true; }
private CropTransform ScaleCropTransform(IScannedImage img, Bitmap referenceBitmap) { using (var bitmap = img.GetImage()) { double xScale = bitmap.Width / (double)referenceBitmap.Width, yScale = bitmap.Height / (double)referenceBitmap.Height; return new CropTransform { Left = (int)Math.Round(CropTransform.Left * xScale), Right = (int)Math.Round(CropTransform.Right * xScale), Top = (int)Math.Round(CropTransform.Top * yScale), Bottom = (int)Math.Round(CropTransform.Bottom * yScale) }; } }
public void AppendImage(IScannedImage img) { ilThumbnailList.Images.Add(img.GetThumbnail(UserConfigManager.Config.ThumbnailSize)); Items.Add("", ilThumbnailList.Images.Count - 1); }
public void AppendImage(IScannedImage img) { ilThumbnailList.Images.Add(img.Thumbnail); Items.Add((img.Tag == null ? "" : img.Tag.ToString()), ilThumbnailList.Images.Count - 1); }
public static void PostProcessStep2(IScannedImage image, ScanProfile profile) { if (!profile.UseNativeUI && profile.BrightnessContrastAfterScan) { if (profile.Brightness != 0) { image.AddTransform(new BrightnessTransform { Brightness = profile.Brightness }); } if (profile.Contrast != 0) { image.AddTransform(new TrueContrastTransform { Contrast = profile.Contrast }); } } }