// This code example demonstrates how to convert a raster image to a vector image.
using Aspose.Svg;
using Aspose.Svg.ImageVectorization;

class Program
{
    static void Main(string[] args) // PNG to SVG in C#
    {
        new Aspose.Svg.License().SetLicense("License.lic");

        // Initialize an instance of the ImageVectorizer class
        var vectorizer = new ImageVectorizer
        {
            Configuration =
            {
                ColorsLimit = 25
            }
        };

        // Vectorize the raster image from the specified file
        var document = vectorizer.Vectorize("image.png");

        // Prepare an output path for an SVG document saving
        string savePath = "source_out.svg";

        // Save vectorized image as SVG file 
        document.Save(savePath);

        System.Console.WriteLine("Done");      
    }
}