Vectorization - Basic Overview | .NET

Contents
[ ]

What does Image Vectorization mean?

There are two ways to represent a two-dimensional image, raster and vector graphics. In raster formats image represents a two-dimensional grid of pixels. This is great for storing pictures and photos, but scaling such images usually leads to quality loss - it becomes blurry and pixelated. In vector graphics, an image is constructed from elements described by mathematical curves, splines, paths and lines. Vector images are constructed and stored as a set of commands, numbers, formulas, not in a pixel grid as in bitmaps. As a result, it is possible to transform such images without quality loss. The process of image conversion from raster to vector is called image vectorization.

Converting an image to vector is very easy using Aspose.SVG API. The ImageVectorization Namespace includes classes and interfaces for implementing the image vectorization process. The following code snippet demonstrates the use of the ImageVectorizer class for image vectorization:

using System.IO;
using Aspose.Svg.ImageVectorization;
using Aspose.Svg.Saving;
...
    
	// Initialize an instance of the ImageVectorizer class
    var vectorizer = new ImageVectorizer
    {
        Configuration = 
		{
			TraceSmoother =   new ImageTraceSmoother(1),
			TraceSimplifier = new ImageTraceSimplifier(0.5f),
			ColorsLimit = 3
		}
    };

    // Vectorize raster image from the specified file
	using var document = vectorizer.Vectorize(Path.Combine(DataDir, "owl.png"));

    // Save vectorized image as SVG file 
	document.Save(Path.Combine(OutputDir, "olw.svg"));

What is meant by Text Vectorization?

Text Vectorization is the process of converting text into digital graphics. In the vectorized SVG text, all font glyphs are replaced with the combination of path, use, mask, g elements, etc. Thus, vectorization promotes text protection from simple copying, unwanted using, borrowing, and modification.

Aspose.SVG proposes you convert text to vector in a short time and with professional quality and resolution! In the vectorized SVG text, all font glyphs are replaced with a combination of graphics elements. Convert your SVG text with our Text to Vector app and get all the advantages of vectorized text!

Text “Banner Text to Vector application”