Нow to work with Aspose.SVG API – C# Examples
SVG files use an XML-based text format to describe how the image should appear. SVG is a resolution-independent format, and SVG files can be scaled to different sizes without losing quality. The SVG format has all the advantages of vector graphics and many other advantages over bitmap formats. SVG is available in all modern web browsers, and as we look forward, it is easy to see that SVG files are the future of web design graphics.
The articles in this chapter provide the required information to start working with Aspose.SVG class library. We look at how the DOM represents an SVG document in memory and how to use API for SVG files creating, editing, colorizing, saving, converting, and merging. The articles provide various C# examples (code snippets) of creating, loading, saving, editing, converting and merging SVG files using Aspose.SVG for .NET API.
Along with the powerful DOM API, one of the key features of Aspose.SVG is quality rendering and converting to many popular formats, such as PDF, XPS, JPEG, PNG, BMP, TIFF, and GIF. Moreover, this library offers additional saving and rendering options, SVG documents merging, Image vectorization, SVG text vectorization, applying scripts, SVG filter effects, and more.
The following articles are available:
- Creating and Loading SVG Documents – You find out how to create SVG from a memory string, stream, or file; how to load SVG from the Web, and read SVG with Resources Async.
- Save an SVG Document – You will learn how to save an SVG document to a file, ZIP archive, memory stream, or Url using Aspose.SVG for .NET library.
- Edit SVG File – You learn how to edit SVG using Aspose.SVG for .NET library. Detailed examples of adding and editing new elements in SVG and applying SVG filters to bitmaps are considered.
- Environment Configuration – You will learn how to create various configurations and adapt them to the different environments where the application runs. This can be a custom theme, a runtime service or a web request network service.
- Navigation & Inspection SVG – This article teaches how to perform a detailed inspection of the SVG document and its elements using the Aspose.SVG API, custom filters usage for iterating over the document elements, and how to navigate the SVG document using CSS Selector or XPath.
- How to Convert SVG Files – The articles in this section provide information on a list of supported SVG conversion scenarios and how to execute them using the Aspose.SVG API. You will learn how to convert SVG to PDF, XPS or Image and find C# examples of SVG conversion.
- How to Change SVG Color – You will explore how to change the color of SVG elements and background in SVG images using Aspose.SVG .NET library.
- Convert Color Codes – The Aspose.SVG C# library helps you programmatically convert color formats – RGB, HEX, HSL, HSV, CMYK, LAB, XYZ, etc.
- How to Optimize SVG Documents – You will learn how to optimize SVG and reduce the size of SVG files.
- How to Merge SVG Documents – You will learn about the Render() method used to convert SVG documents to another format and merge them into a single file.
- Vectorization – 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.
- How to create an NFT? – Learn about an NFT digital ownership certificate, its pros and cons, what is an NFT smart contract, why it is needed, and how to create an NFT.
- SVG Filters – Learn how to write SVG code for various filters and see C# examples to implement the Gaussian blur, drops shadow, color saturation, and light effects to SVG elements and bitmaps.
- SVG Gradients – Learn how to create SVG gradients in XML code and walk through C# examples of implementing SVG gradients using the Aspose.SVG for .NET API.
- SVG Transformations – This chapter describes popular SVG transformations, as well as C# examples for the most common transformation scenarios.
Aspose.SVG offers SVG Free Web Applications for converting SVG, JPG or PNG files, merging SVG files, image vectorizing, SVG sprite creating, SVG to base64 data encoding, and text vectorizing in SVG documents. These online Apps work on any operating system with a web browser and don’t require additional software installation. It’s a fast and easy way to efficiently and effectively solve your SVG-related tasks!