本文整理汇总了C#中Windows.UI.Xaml.Media.Imaging.WriteableBitmap.Convolute方法的典型用法代码示例。如果您正苦于以下问题:C# WriteableBitmap.Convolute方法的具体用法?C# WriteableBitmap.Convolute怎么用?C# WriteableBitmap.Convolute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Windows.UI.Xaml.Media.Imaging.WriteableBitmap
的用法示例。
在下文中一共展示了WriteableBitmap.Convolute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateBluredCoverArt
private async void CreateBluredCoverArt(string coverArt)
{
var writeableBitmap = new WriteableBitmap(1, 1);
var streamTask = coverArt == CoverArtPlaceholderLarge ? GetStreamFromFile(coverArt) : GetStreamFromUri(coverArt);
using (var stream = await streamTask)
{
writeableBitmap = await writeableBitmap.FromStream(stream);
}
var bluredImage = writeableBitmap.Convolute(Gaussian11X11Kernel);
BluredCoverArt = bluredImage;
}
示例2: CreateBluredCoverArt
private async void CreateBluredCoverArt(string coverArt)
{
var dispatcher = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;
await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async () =>
{
var writeableBitmap = new WriteableBitmap(1, 1);
var streamTask = coverArt == CoverArtPlaceholderLarge
? GetStreamFromFile(coverArt)
: GetStreamFromUri(coverArt);
using (var stream = await streamTask)
{
writeableBitmap = await writeableBitmap.FromStream(stream);
var bluredImage = writeableBitmap.Convolute(Gaussian11X11Kernel);
BluredCoverArt = bluredImage;
}
});
}