Skip to content

Commit

Permalink
Work around for mono/SkiaSharp#2645
Browse files Browse the repository at this point in the history
  • Loading branch information
davidxuang committed Nov 23, 2023
1 parent 75726fd commit 35a9a62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MusicDecrypto.Avalonia/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ public async ValueTask DecryptFileAsync(Item item)
if (info.Cover != null)
{
using var stream = new MemoryStream(info.Cover);
item.Cover = Bitmap.DecodeToWidth(stream, (int)(72 * 2 * _scaling));
// https://github.com/mono/SkiaSharp/issues/2645
// item.Cover = Bitmap.DecodeToWidth(stream, (int)(72 * 2 * _scaling));
item.Cover = new(stream);
}

await using (var file = await newFile!.OpenWriteAsync())
Expand Down

0 comments on commit 35a9a62

Please sign in to comment.