本文整理汇总了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"));
}
}
}
示例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"));
}
}
示例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"));
}
}
}
示例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"));
}
}
}
}
示例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"));
}
}
}
}