/// <summary> /// Copies the image scaled to fill the form when its resized. /// </summary> public void CopyScaledImage() { using (Bitmap img = ImageProcessor.GetResizedBitmap(this.Image, new Size(Width - Options.BorderThickness, Height - Options.BorderThickness))) { ClipboardHelper.CopyImage(img); } }
/// <summary> /// Copies the zoomed image shown when the mouse wheel is zoomed in. /// </summary> public void CopyZoomedImage() { if (zdbZoomedImageDisplay.image != null) { ClipboardHelper.CopyImage(zdbZoomedImageDisplay.image); } }
public static void RegionCapture(RegionCaptureMode mode, bool creatClip = false) { using (RegionCaptureForm regionCapture = new RegionCaptureForm(ScreenHelper.GetScreenBounds(), mode)) { regionCapture.ShowDialog(); LastRegionResult?.Dispose(); LastRegionResult = regionCapture.GetRsult(); if (LastRegionResult.Result == RegionResult.Close) { return; } if (LastRegionResult.Result == RegionResult.Color) { if (SettingsManager.RegionCaptureSettings.Auto_Copy_Color) { ClipboardHelper.FormatCopyColor(SettingsManager.MiscSettings.Default_Color_Format, LastRegionResult.Color); } return; } if (SettingsManager.RegionCaptureSettings.Auto_Copy_Image) { ClipboardHelper.CopyImage(LastRegionResult.Image); } string path = string.Empty; if (InternalSettings.Save_Images_To_Disk) { path = PathHelper.GetNewImageFileName(); } if (creatClip) { ClipOptions ops = new ClipOptions(ScreenHelper.GetRectangle0Based(LastRegionResult.Region).Location); ops.FilePath = path; ClipManager.CreateClip(LastRegionResult.Image, ops); } if (InternalSettings.Save_Images_To_Disk) { Save(path, LastRegionResult.Image); } if (LastRegionResult.Image != null) { LastRegionResult.Image.Dispose(); } } }
/// <summary> /// Copies the original image. /// </summary> public void CopyImage() { ClipboardHelper.CopyImage(Image); cmMain.Close(); }