Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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;
 }
Beispiel #5
0
 /// <summary> Initializes a new instance of the ImageMagickSharp.MagickWand class. </summary>
 private MagickWand()
 {
     Wand.EnsureInitialized();
     this.Handle = MagickWandInterop.NewMagickWand();
 }