示例#1
0
 /// <summary>
 /// Creates an image object from bytes.
 /// </summary>
 /// <param name="stream">Stream of bytes</param>
 public Image(MemoryStream stream)
 {
     if (stream == null || stream.Length == 0)
     {
         throw new Errors.NullImageError();
     }
     _bitmap = (Bitmap)Bitmap.FromStream(stream, false, false);
     stream.Dispose();
     COMDisposable.Subscribe(this, typeof(ComInterfaces._Image));
 }
示例#2
0
 /// <summary>
 /// Creates a new WebDriver object.
 /// </summary>
 public WebDriver()
 {
     UnhandledException.Initialize();
     RegisterRunningObject();
     COMDisposable.Subscribe(this, typeof(ComInterfaces._WebDriver));
 }
示例#3
0
 /// <summary>
 /// Creates a new empty PDF
 /// </summary>
 public PdfFile()
 {
     _writer = new PdfWriter();
     _writer.AddPage(_pageWidthPt, _pageHeightPt);
     COMDisposable.Subscribe(this, typeof(ComInterfaces._PdfFile));
 }
示例#4
0
 /// <summary>
 /// Creates an image object from a bitmap
 /// </summary>
 /// <param name="image"></param>
 public Image(Bitmap image)
 {
     _bitmap = image;
     COMDisposable.Subscribe(this, typeof(ComInterfaces._Image));
 }