I agree that SVG is especially useful for icons, so first-class SVG support has now been implemented for the next release: https://feedback.objo.dev/feature/762
SVG pictures can be loaded from files:
Var icon As New Picture("icons/settings.svg")
From project assets:
Var icon As Picture = Picture.FromAsset("Icons/Settings")
Or directly from an SVG string:
Var icon As Picture = Picture.FromSVG(svgText)
Picture.FromBytes() also recognises SVG data.
SVG pictures remain vector-backed while being displayed or drawn, so they stay crisp at different sizes and on HiDPI displays. A single SVG project asset therefore replaces the need for @2x and @3x variants. Studio can also import and preview SVG assets.
The new read-only IsVector property indicates whether a picture still has its vector backing. Operations that require individual pixels such as Pixel, SetPixel, or accessing Graphics rasterise it.
Since SVG is already XML text, the best way to preserve an SVG in a database is to store its original markup in a text column and recreate the picture with Picture.FromSVG() when required. Picture deliberately does not convert bitmap pictures into SVG or return the original SVG markup.
SVGs are loaded as secure static artwork: scripts are not executed, DTDs are rejected, and external files or network resources are not loaded.
When I push the next release, the documentation will be at: https://docs.objo.dev/desktop/picture