|
|
@ -39,8 +39,7 @@ public partial class TextToImageViewModel : ObservableObject |
|
|
|
var bitmapImage = new BitmapImage(); |
|
|
|
var bitmapImage = new BitmapImage(); |
|
|
|
bitmapImage.BeginInit(); |
|
|
|
bitmapImage.BeginInit(); |
|
|
|
|
|
|
|
|
|
|
|
using var stream = new MemoryStream(imageBytes, 0, imageBytes.Length); |
|
|
|
bitmapImage.StreamSource = new MemoryStream(imageBytes, 0, imageBytes.Length); |
|
|
|
bitmapImage.StreamSource = stream; |
|
|
|
|
|
|
|
bitmapImage.EndInit(); |
|
|
|
bitmapImage.EndInit(); |
|
|
|
return bitmapImage; |
|
|
|
return bitmapImage; |
|
|
|
} |
|
|
|
} |
|
|
|