From 08431e6880e2c4fa22e4d4a99a1ad75248627d13 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sat, 27 May 2023 01:47:48 -0400 Subject: [PATCH] Remove using stream --- StabilityMatrix/ViewModels/TextToImageViewModel.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/StabilityMatrix/ViewModels/TextToImageViewModel.cs b/StabilityMatrix/ViewModels/TextToImageViewModel.cs index b3abf65b..a710e61e 100644 --- a/StabilityMatrix/ViewModels/TextToImageViewModel.cs +++ b/StabilityMatrix/ViewModels/TextToImageViewModel.cs @@ -39,8 +39,7 @@ public partial class TextToImageViewModel : ObservableObject var bitmapImage = new BitmapImage(); bitmapImage.BeginInit(); - using var stream = new MemoryStream(imageBytes, 0, imageBytes.Length); - bitmapImage.StreamSource = stream; + bitmapImage.StreamSource = new MemoryStream(imageBytes, 0, imageBytes.Length); bitmapImage.EndInit(); return bitmapImage; }