Browse Source

Remove using stream

pull/5/head
Ionite 2 years ago
parent
commit
08431e6880
No known key found for this signature in database
  1. 3
      StabilityMatrix/ViewModels/TextToImageViewModel.cs

3
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;
}

Loading…
Cancel
Save