BitmapImage bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bitmap.CacheOption = BitmapCacheOption.OnLoad;
bitmap.UriSource = new Uri(testImage, UriKind.RelativeOrAbsolute);
bitmap.EndInit();
转载于:https://www.cnblogs.com/canyeweiwei/p/11134428.html