Пример #1
0
        public MagickWand(params string[] paths)
        {
            Wand.EnsureInitialized();
            this.Handle = MagickWandInterop.NewMagickWand();
            if (this.Handle == IntPtr.Zero)
            {
                throw new Exception("Error acquiring wand.");
            }

            this.OpenImages(paths);
        }
Пример #2
0
        public MagickWand(int width, int height)
        {
            Wand.EnsureInitialized();
            this.Handle = MagickWandInterop.NewMagickWand();
            if (this.Handle == IntPtr.Zero)
            {
                throw new Exception("Error acquiring wand.");
            }

            this.Size = new WandSize(width, height);
        }
Пример #3
0
        /// <summary> Initializes a new instance of the ImageMagickSharp.MagickWand class. </summary>
        /// <exception cref="Exception"> Thrown when an exception error condition occurs. </exception>
        /// <param name="width"> The width. </param>
        /// <param name="height"> The height. </param>
        /// <param name="pixelWand"> The pixel wand. </param>
        public MagickWand(int width, int height, PixelWand pixelWand)
        {
            Wand.EnsureInitialized();
            this.Handle = MagickWandInterop.NewMagickWand();
            if (this.Handle == IntPtr.Zero)
            {
                throw new Exception("Error acquiring wand.");
            }

            this.NewImage(width, height, pixelWand);
        }
Пример #4
0
 /// <summary> Initializes a new instance of the ImageMagickSharp.MagickWand class. </summary>
 private MagickWand()
 {
     Wand.EnsureInitialized();
     this.Handle = MagickWandInterop.NewMagickWand();
 }