We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tried with several SVGs:
Sample svg
Gets rendered as:
And Sample svg
Is completely invisible.
Code:
SKSvg svg = new SKSvg(); SKEncodedImageFormat skFormat = SKEncodedImageFormat.Png; svg.Load(svgStream); //SKRect svgSize = svg.Picture.CullRect; float canvasMin = Math.Min(svg.Picture.CullRect.Width, svg.Picture.CullRect.Height); float svgMax = Math.Max(svg.Picture.CullRect.Width, svg.Picture.CullRect.Height); float scale = canvasMin / svgMax; var matrix = SKMatrix.MakeScale(scale, scale); SKBitmap bitmap = new SKBitmap((int)svg.Picture.CullRect.Width, (int)svg.Picture.CullRect.Height); SKCanvas canvas = new SKCanvas(bitmap); canvas.DrawPicture(svg.Picture, ref matrix); canvas.Flush(); SKImage image = SKImage.FromBitmap(bitmap); SKData data = image.Encode(skFormat, 100); MemoryStream outMs = new MemoryStream(); data.SaveTo(outMs); cachedRender = outMs.ToArray(); base.Image = new Bitmap(cachedRender); FileStream foo = new FileStream("/mnt/datos/foo.png", FileMode.Create); foo.Write(cachedRender, 0, cachedRender.Length); foo.Close();
The text was updated successfully, but these errors were encountered:
Hi, Natalia. Seems like this is the same bug, as in #42
Sorry, something went wrong.
Closing this as it is a duplicate of #42 fixed in #44
No branches or pull requests
Tried with several SVGs:
Sample svg
Gets rendered as:
And
Sample svg
Is completely invisible.
Code:
The text was updated successfully, but these errors were encountered: