protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
        {
            output.FetchOutputStream(SaveImage, e.ImageNames.FullSize, e.FullSizeImage);

            if (e.IsThumbnailed)
            {
                output.FetchOutputStream(SaveImage, e.ImageNames.Thumbnail, e.ThumbnailImage);
            }
        }
        protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
        {
            output.FetchOutputStream(SaveImage, e.ImageNames.FullSize, e.FullSizeImage);

            if (e.IsThumbnailed)
            {
                output.FetchOutputStream(SaveImage, e.ImageNames.Thumbnail, e.ThumbnailImage);
            }
        }
Ejemplo n.º 3
0
        private void persistableOutput_ImageCaptured(object sender, ImageCapturedEventArgs e)
        {
            this._output.FetchOutputStream(new StreamHandler(this.SaveImage), e.ImageNames.FullSize, e.FullSizeImage);

            using (ScreenshotDetailsForm form = new ScreenshotDetailsForm(this, this.ProcessImage, e.ImageNames.FullSize))
            {
                form.ShowDialog();
            }
        }
Ejemplo n.º 4
0
 protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
 {
     capturedImage = e.FullSizeImage;
     Print();
 }
Ejemplo n.º 5
0
 protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 6
0
 protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 7
0
 protected abstract void ImageCaptured(object sender, ImageCapturedEventArgs e);
Ejemplo n.º 8
0
 protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
 {
     try
     {
         switch (PluginSettings.Format)
         {
             case ClipboardOutputFormat.Bitmap:
                 Clipboard.SetImage(e.FullSizeImage);
                 break;
             case ClipboardOutputFormat.Jpg:
                 using (MemoryStream stream = new MemoryStream())
                 {
                     SaveJpegImage(stream, e.FullSizeImage);
                     using (Image bitmap = Bitmap.FromStream(stream))
                         Clipboard.SetDataObject(bitmap, true);
                 }
                 break;
             case ClipboardOutputFormat.Png:
                 using (MemoryStream stream = new MemoryStream())
                 {
                     e.FullSizeImage.Save(stream, ImageFormat.Png);
                     using (Image bitmap = Bitmap.FromStream(stream))
                         Clipboard.SetDataObject(bitmap, true);
                 }
                 break;
         }
     }
     catch (ExternalException ex)
     {
         throw new InvalidOperationException("The image was not saved to the clipboard.", ex);
     }
 }
Ejemplo n.º 9
0
 private ImageCapturedEventArgs ProcessCapturedImage(Image image, double maxThumbnailSize)
 {
     ImageCapturedEventArgs imageCapturedEventArgs = new ImageCapturedEventArgs();
     imageCapturedEventArgs.ImageNames = template.Parse(ImageFormat.Extension);
     imageCapturedEventArgs.FullSizeImage = image;
     imageCapturedEventArgs.IsThumbnailed = (maxThumbnailSize > 0.0);
     if (imageCapturedEventArgs.IsThumbnailed)
         imageCapturedEventArgs.ThumbnailImage = CreateThumbnailImage(image, maxThumbnailSize);
     lastImageCaptured = imageCapturedEventArgs.ImageNames.FullSize;
     return imageCapturedEventArgs;
 }
Ejemplo n.º 10
0
 protected void OnImageCaptured(ImageCapturedEventArgs e)
 {
     ImageCapturedEventHandler handler = ImageCaptured;
     if (handler != null)
         handler(this, e);
 }
Ejemplo n.º 11
0
 protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
 {
     var text = OCRHelper.OCRMagnet(e.FullSizeImage);
     Clipboard.SetText(text);
 }
Ejemplo n.º 12
0
 protected override void ImageCaptured(object sender, ImageCapturedEventArgs e)
 {
     this._fileName = e.ImageNames.FullSize;
     output.FetchOutputStream(new StreamHandler(this.SaveImage), this._fileName, e.FullSizeImage);
 }
Ejemplo n.º 13
0
 protected abstract void ImageCaptured(object sender, ImageCapturedEventArgs e);