/// <summary> /// Creates a new image of the control using an image object. /// </summary> /// <param name="image">The image object.</param> public GcImage(Dt.Pdf.Drawing.Image image) { if (image == null) { throw new ArgumentNullException("image"); } this.image = image; base.width = (int)image.Width; base.height = (int)image.Height; }
/// <summary> /// Creates a new image of the control using image data. /// </summary> /// <param name="imageData">The image data.</param> public GcImage(byte[] imageData) { if ((imageData == null) || (imageData.Length < 4)) { throw new ArgumentNullException("imageData"); } this.image = Dt.Pdf.Drawing.Image.GetInstance(imageData); base.width = (int)this.image.Width; base.height = (int)this.image.Height; }