Skip to content

Instantly share code, notes, and snippets.

View abelopez-benchmark's full-sized avatar
🏠
Working from home

Abel Lopez abelopez-benchmark

🏠
Working from home
View GitHub Profile
@punker76
punker76 / convert.cs
Created April 8, 2020 20:13
SkiaSharp Svg to Png
// memoryStream is the stream of the svg url
// imageStream is the converted png which will be converted with Splat.BitmapLoader to an IBitmap
var svg = new SkiaSharp.Extended.Svg.SKSvg();
svg.Load(memoryStream);
var imageInfo = new SKImageInfo((int)desiredSize.Width, (int)desiredSize.Height);
using (var surface = SKSurface.Create(imageInfo))
using (var canvas = surface.Canvas)
{