//Note: Run within QueuedTask.Run
//Create a point symbol
var pointSymbol = SymbolFactory.Instance.ConstructPointSymbol(
ColorFactory.Instance.RedRGB, 24, SimpleMarkerStyle.RoundedSquare);
//Generate image returns a stream
//OutputImageFormat specified the format for the image - in this case
//we want SVG (an xml-based format)
//
//output fmt: SVG, scale factor x2, centerAnchorPoint = true
//dpi = 300, wd x ht: 100x100px, background: white
var mem_strm = SymbolFactory.Instance.GenerateImage(
pointSymbol, OutputImageFormat.SVG, 2.0, true, 300, 100, 100,
ColorFactory.Instance.WhiteRGB);
//Set the memory stream position to the beginning
mem_strm.Seek(0, SeekOrigin.Begin);
//File path and name for saving the SVG file
var fileName = "RoundedSquareSymbol.svg";
string path_svg = Path.Combine(Path.GetTempPath() + fileName);
//Write the memory stream to the file
System.IO.File.WriteAllBytes(path_svg, mem_strm.ToArray());
//////////////////////////////////////////////
//Note: to convert SVG to image format, use a 3rd party
//e.g. Aspose.SVG for .NET, for example convert SVG to PNG
//using (var svg_doc = new Aspose.Svg.SVGDocument(path_svg))
//{
// string path_png = Path.Combine(Path.GetTempPath() + "RoundedSquareSymbol.png");
// using (var img_png = new Aspose.Svg.Rendering.Image.ImageDevice(
// new ImageRenderingOptions(ImageFormat.Png), path_png))
// {
// svg_doc.RenderTo(img_png);
// }
// //also: https://docs.aspose.com/imaging/net/convert-svg-to-png/
//}