这没有给我任何结果。代码有什么问题?顺便说一句,下面的代码模糊了图像。
var ImgFile = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/search.png"));
var wb = new WriteableBitmap(1, 1);
using (var strm = await ImgFile.OpenReadAsync())
{
wb.SetSource(strm);
}
var wb2 = new WriteableBitmap(wb.PixelWidth,wb.PixelHeight);
var wb3 = WriteableBitmapExtensions.Convolute(wb2, WriteableBitmapExtensions.KernelGaussianBlur5x5);
PageBackground.Source = wb3;