Browse Source

Formatting

pull/165/head
Ionite 1 year ago
parent
commit
7b4ec0dc8b
No known key found for this signature in database
  1. 8
      StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs

8
StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs

@ -418,14 +418,16 @@ public partial class SettingsViewModel : PageViewModelBase
var grid = ImageProcessor.CreateImageGrid(images.ToImmutableArray()); var grid = ImageProcessor.CreateImageGrid(images.ToImmutableArray());
// Show preview // Show preview
var image = new Image();
using var peekPixels = grid.PeekPixels(); using var peekPixels = grid.PeekPixels();
using var data = peekPixels.Encode(SKEncodedImageFormat.Jpeg, 100); using var data = peekPixels.Encode(SKEncodedImageFormat.Jpeg, 100);
await using var stream = data.AsStream(); await using var stream = data.AsStream();
image.Source = WriteableBitmap.Decode(stream); var image = new Image
{
Source = WriteableBitmap.Decode(stream)
};
var dialog = new BetterContentDialog var dialog = new BetterContentDialog
{ {
Content = image, Content = image,

Loading…
Cancel
Save