C# Класс csImb.Screenshots

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Screenshot IMB3.TEventEntry

Открытые методы

Метод Описание
GetImageFromControl ( FrameworkElement controlToConvert ) : System.Windows.Media.Imaging.PngBitmapEncoder

Convert any control to a PngBitmapEncoder

GetImageOfControl ( Control controlToConvert ) : ImageSource

Get an ImageSource of a control

GetJpgImage ( FrameworkElement source, double scale, int quality ) : byte[]
InitChannel ( ) : bool
LoadBitmap ( Bitmap source ) : System.Windows.Media.Imaging.BitmapSource
ProcessScreenshot ( Image screenshot ) : void

Send a screenshot over the bus. Identical to TakeScreenshot, except that this method does not capture the screenshot itself.

SaveImageOfControl ( Control controlToConvert, string fileName ) : ImageSource

Save an image of a control

Start ( int interval ) : void
Stop ( ) : void

Приватные методы

Метод Описание
AddImageComment ( Stream jpegStreamIn, string propValue, int propId ) : Stream
CropImage ( Image img, Rectangle cropArea ) : Image
GetImageByteArray ( System.Windows.Media.Imaging.BitmapSource bi ) : byte[]
GetImageFromByteArray ( byte pixelInfo, int height, int width ) : System.Windows.Media.Imaging.BitmapSource
GetSubRectangle ( Image imgToDivide, int totalX, int totalY, int x, int y ) : Image
TakeScreenshot ( ) : void

Take a screenshot and send it over the bus.

TimerTick ( object sender, EventArgs e ) : void
WpfToRealPixels ( Window w, Point p ) : Point

Get screen from Window (uses WindowInteropHelper to get the handle from a Window).

resizeImage ( Image imgToResize, Size size ) : Image

Описание методов

GetImageFromControl() публичный статический Метод

Convert any control to a PngBitmapEncoder
public static GetImageFromControl ( FrameworkElement controlToConvert ) : System.Windows.Media.Imaging.PngBitmapEncoder
controlToConvert System.Windows.FrameworkElement The control to convert to an ImageSource
Результат System.Windows.Media.Imaging.PngBitmapEncoder

GetImageOfControl() публичный статический Метод

Get an ImageSource of a control
public static GetImageOfControl ( Control controlToConvert ) : ImageSource
controlToConvert System.Windows.Controls.Control The control to convert to an ImageSource
Результат ImageSource

GetJpgImage() публичный Метод

public GetJpgImage ( FrameworkElement source, double scale, int quality ) : byte[]
source System.Windows.FrameworkElement
scale double
quality int
Результат byte[]

InitChannel() публичный Метод

public InitChannel ( ) : bool
Результат bool

LoadBitmap() публичный статический Метод

public static LoadBitmap ( Bitmap source ) : System.Windows.Media.Imaging.BitmapSource
source System.Drawing.Bitmap
Результат System.Windows.Media.Imaging.BitmapSource

ProcessScreenshot() публичный Метод

Send a screenshot over the bus. Identical to TakeScreenshot, except that this method does not capture the screenshot itself.
public ProcessScreenshot ( Image screenshot ) : void
screenshot System.Drawing.Image Original image with 96x96 DPI
Результат void

SaveImageOfControl() публичный статический Метод

Save an image of a control
public static SaveImageOfControl ( Control controlToConvert, string fileName ) : ImageSource
controlToConvert System.Windows.Controls.Control The control to convert to an ImageSource
fileName string The location to save the image to
Результат ImageSource

Start() публичный Метод

public Start ( int interval ) : void
interval int
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void

Описание свойств

Screenshot публичное свойство

public TEventEntry,IMB3 Screenshot
Результат IMB3.TEventEntry