diff --git a/src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/W2DCanvas.cs b/src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/W2DCanvas.cs index cd311a0b..00ba0ce4 100644 --- a/src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/W2DCanvas.cs +++ b/src/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop/W2DCanvas.cs @@ -510,7 +510,10 @@ private CanvasBitmap CreatePatternBitmap(IPattern pattern) public override void DrawImage(IImage image, float x, float y, float width, float height) { - if (image is W2DImage platformImage) + var stream = image.AsStream(); + var imageFromStream = W2DImage.FromStream(stream); + + if (imageFromStream is W2DImage platformImage) { SetRect(x, y, width, height);