From fa970142922e9a08c7aa26ce5446deabeab657cb Mon Sep 17 00:00:00 2001 From: Fusion86 Date: Thu, 21 Apr 2022 23:03:52 +0200 Subject: [PATCH] Workaround for mono/SkiaSharp#1551 Fixes #7773 --- src/Skia/Avalonia.Skia/ImmutableBitmap.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Skia/Avalonia.Skia/ImmutableBitmap.cs b/src/Skia/Avalonia.Skia/ImmutableBitmap.cs index 3010f49420c..a63611bca9e 100644 --- a/src/Skia/Avalonia.Skia/ImmutableBitmap.cs +++ b/src/Skia/Avalonia.Skia/ImmutableBitmap.cs @@ -57,7 +57,8 @@ public ImmutableBitmap(ImmutableBitmap src, PixelSize destinationSize, BitmapInt public ImmutableBitmap(Stream stream, int decodeSize, bool horizontal, BitmapInterpolationMode interpolationMode) { using (var skStream = new SKManagedStream(stream)) - using (var codec = SKCodec.Create(skStream)) + using (var skData = SKData.Create(skStream)) + using (var codec = SKCodec.Create(skData)) { var info = codec.Info;