Vectorization – Basic Overview – C# Examples

In this section, under vectorization, we mean the process of replacing bitmaps or SVG text with mathematic curves, geometric shapes made up from path elements and stored as SVG. The articles in this section explain how to convert SVG text to vector and how to convert raster image to vector graphic using the Aspose.SVG API. Convert your raster documents to vector graphic!

Image Vectorization Workflow – You will find image vectorization info, a description of the image vectorization process and vectorization options, learn how to vectorize raster images such as PNG, JPG, BMP, TIFF, GIF, ICO into an SVG document.

Image Vectorization Examples – This article explains how to convert bitmap to vector graphic using the Aspose.SVG API. You will consider a few C# examples that demonstrate the ImageVectorization functionalities and the effect of configuration properties on the vectorization result.

Image Stencil – This article explains how to create stencils from images using the Aspose.SVG API.

Text Vectorization – This article explains how to convert SVG text to vector using the VectorizeText property of the SVGSaveOptions class.

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:

 1using System.IO;
 2using Aspose.Svg.ImageVectorization;
 3using Aspose.Svg.Saving;
 4...
 5
 6	// Initialize an instance of the ImageVectorizer class
 7	var vectorizer = new ImageVectorizer();
 8	
 9	// Vectorize image from the specified file
10	var document = vectorizer.Vectorize(Path.Combine(DataDir, "flower.png"));
11
12	// Save vectorized Image as SVG file 
13	document.Save(Path.Combine(OutputDir, "flower.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 application and get all the advantages of vectorized text!

Text “Banner Text to Vector application”

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.