This short tutorial guides on how to convert Raster image to SVG using C# by following the detailed steps. In order to convert raster to SVG C# is used in this example using a few lines of code. The application can be used in any of .NET supported environment incuding Windows, Linux and macOS.
Steps to Convert Raster Image to SVG using C#
- Configure the project environment to add Aspose.Imaging using the NuGet package manager
- Load the source TIFF image using the Image class object
- Use SvgOptions class object to set desired SVG image properties
- Set the desired SVG image properties
- Convert raster to SVG image using the Save method
To Convert TIFF to SVG C# based environment settings, namespace, classes, and methods are shared in the above steps. You may load any type of raster images including TIFF, PNG, GIF, JPEG, PSD, WEBP and J2K using the Image.Load() method. Using SvgOption instance, different properties of desired SVG image are set and finally you can convert Tiff to SVG using the Save method.
Code for Raster Image to SVG Converter in C#
In C# TIFF to SVG converter application is developed using the above example where you can customize the output SVG image by setting the different properties of SvgOptions instance like MultiPageOptions, TextAsShapes, ResolutionSettings, VectorRasterizationOptions, ColorType, Compression and FullFrame before saving the image on the disk using the Save method.
This crisp tutorial has walked you through how using C# raster to SVG converter application can be developed using simple API interface. If you are interested in learning about cropping the images, refer to the article on how to crop Image in C#.