Esempio n. 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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
 /// <summary> Initializes a new instance of the ImageMagickSharp.MagickWand class. </summary>
 /// <param name="wand"> The wand. </param>
 private MagickWand(IntPtr wand)
 {
     Wand.EnsureInitialized();
     this.Handle = wand;
 }
Esempio n. 5
0
 /// <summary> Initializes a new instance of the ImageMagickSharp.MagickWand class. </summary>
 private MagickWand()
 {
     Wand.EnsureInitialized();
     this.Handle = MagickWandInterop.NewMagickWand();
 }