Once SKSvg.Picture is available, export paths are simple and explicit.
SKPictureExtensions.ToBitmap() and ToImage() are the main raster helpers.
using System.IO;
using SkiaSharp;
using Svg.Skia;
using var svg = new SKSvg();
svg.Load("image.svg");
using var stream = File.OpenWrite("image.webp");
svg.Picture!.ToImage(
stream,
SKColors.Transparent,
SKEncodedImageFormat.Webp,
100,
1f,
1f,
SKImageInfo.PlatformColorType,
SKAlphaType.Unpremul,
svg.Settings.Srgb);
SKPictureExtensions also includes document-style exports:
using SkiaSharp;
using Svg.Skia;
using var svg = new SKSvg();
svg.Load("image.svg");
svg.Picture!.ToSvg("image-roundtrip.svg", SKColors.Transparent, 1f, 1f);
svg.Picture!.ToPdf("image.pdf", SKColors.Transparent, 1f, 1f);
svg.Picture!.ToXps("image.xps", SKColors.Transparent, 1f, 1f);
The export helpers accept:
scaleX and scaleY,That makes it possible to reuse the same SKPicture for:
The Svg.Skia.Converter tool supports:
pngjpgjpegwebppdfxpsSee CLI Conversion for batch examples.