Replies: 1 comment 2 replies
-
Well, this seemed to work, but it's pretty ugly. Update: worked for .jpg but failed for .svg. Still hoping to find a "correct" way. Maybe I need to brand my Maui desktop app "NETSTANDARD2_1" somehow? Really feeling clueless now.
Seems like the .svg file loaded OK but W2DImage.FromStream could not find some component to render .svg data into a bitmap. .svg runtime error (from a different project, but same failing code which works if I point at a .jpg resource): System.Runtime.InteropServices.COMException |
Beta Was this translation helpful? Give feedback.
-
I'm trying to draw an image on a canvas with code, using approaches from GraphicsView Reference and Draw Graphical Objects (Image). This is working on an Android target, but failing to build for Windows target because the Microsoft.Maui.Graphics.Platform assembly is unavailable.
In documentation this is done using PlatformImage.FromStream, but this static method resides in Microsoft.Maui.Graphics.Platform which seems to be deliberately omitted for the windows/net6.0 platform (I'm trying to build for net6.0-windows10.0.19041) (see PlatformImage.cs).
Beta Was this translation helpful? Give feedback.
All reactions