当前位置: 首页>>代码示例>>C#>>正文


C# MagickWand.CloneMagickWand方法代码示例

本文整理汇总了C#中MagickWand.CloneMagickWand方法的典型用法代码示例。如果您正苦于以下问题:C# MagickWand.CloneMagickWand方法的具体用法?C# MagickWand.CloneMagickWand怎么用?C# MagickWand.CloneMagickWand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MagickWand的用法示例。


在下文中一共展示了MagickWand.CloneMagickWand方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CoverArtWandShadowTests

 public void CoverArtWandShadowTests()
 {
     using (var wand = new MagickWand(TestImageFolder1))
     {
         using (MagickWand nailclone = wand.CloneMagickWand())
         using (var blackPixelWand = new PixelWand(ColorName.Black))
         {
             nailclone.CurrentImage.BackgroundColor = blackPixelWand;
             nailclone.CurrentImage.ShadowImage(80, 5, 5, 5);
             nailclone.CurrentImage.CompositeImage(wand, CompositeOperator.CopyCompositeOp, 0, 0);
             nailclone.SaveImage(Path.Combine(SaveDirectory, "logo_extent.png"));
         }
     }
 }
开发者ID:NazioByte,项目名称:ImageMagickSharp,代码行数:14,代码来源:CoverArtWandTests.cs

示例2: CoverArtWand3DTests

        public void CoverArtWand3DTests()
        {
            using (var wand = new MagickWand(TestImageFolder1))
            {
                var t = wand.CloneMagickWand();
                t.CurrentImage.ShearImage(new PixelWand(ColorHEX.None, 1), 0, 10);
                t.CurrentImage.ExtentImage(t.CurrentImage.Width + 50, t.CurrentImage.Height + 50, -25, -25);
                //RaiseImage
                //wand.CurrentImage.ShadeImage(true, 5, 6);
                //
                wand.CurrentImage.TrimImage(100);
                t.SaveImage(Path.Combine(SaveDirectory, "logo_extent.png"));

            }
        }
开发者ID:NazioByte,项目名称:ImageMagickSharp,代码行数:15,代码来源:CoverArtWandTests.cs

示例3: MediaBrowserResizeImageTest

        public void MediaBrowserResizeImageTest()
        {
            using (var wand = new MagickWand(TestImageBackdrop))
            {
                var w = wand.CurrentImage.Width;
                var h = wand.CurrentImage.Height;

                using (var mwr = wand.CloneMagickWand())
                {
                    var newW = 1280;
                    var newH = 720;
                    mwr.CurrentImage.ResizeImage(newW, newH);
                    mwr.CurrentImage.StripImage();
                    mwr.SaveImage(Path.Combine(SaveDirectory, Guid.NewGuid().ToString() + ".jpg"));
                }
            }
        }
开发者ID:NazioByte,项目名称:ImageMagickSharp,代码行数:17,代码来源:MediaBrowserWandTests.cs

示例4: MediaBrowserCollectionImageTest

        public void MediaBrowserCollectionImageTest()
        {
            using (var wand = new MagickWand(TestImageBackdrop))
            {
                var w = wand.CurrentImage.Width;
                var h = wand.CurrentImage.Height;

                wand.CurrentImage.AlphaChannel = AlphaChannelType.DeactivateAlphaChannel;
                using (var mwr = wand.CloneMagickWand())
                {
                    mwr.CurrentImage.ResizeImage(w, h / 2, FilterTypes.LanczosFilter, 1);
                    using (var mwg = new MagickWand(w, h / 2))
                    {
                        mwg.OpenImage(TestImageBackdrop);
                        mwr.CurrentImage.CompositeImage(mwg, CompositeOperator.CopyOpacityCompositeOp, 0, 0);
                        wand.AddImage(mwr);
                        var t = wand.AppendImages(true);
                        t.SaveImage(Path.Combine(SaveDirectory, Guid.NewGuid().ToString() + ".jpg"));
                    }
                }
            }
        }
开发者ID:NazioByte,项目名称:ImageMagickSharp,代码行数:22,代码来源:MediaBrowserWandTests.cs

示例5: MediaBrowserResizePerformanceImageTest

        public void MediaBrowserResizePerformanceImageTest()
        {
            for (var i = 0; i < 100; i++)
            {
                using (var wand = new MagickWand(TestImageBackdrop))
                {
                    var w = wand.CurrentImage.Width;
                    var h = wand.CurrentImage.Height;

                    using (var mwr = wand.CloneMagickWand())
                    {
                        var newW = 1280;
                        var newH = 720;
                        mwr.CurrentImage.ResizeImage(newW, newH, FilterTypes.CatromFilter);
                        mwr.SaveImage(Path.Combine(SaveDirectory, Guid.NewGuid().ToString() + ".jpg"));
                    }
                }
            }
        }
开发者ID:NazioByte,项目名称:ImageMagickSharp,代码行数:19,代码来源:MediaBrowserWandTests.cs


注:本文中的MagickWand.CloneMagickWand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。