Aspose.SVG.Drawing.SkiaSharp – Enhanced SVG Drawing and Conversion
Aspose.SVG.Drawing.SkiaSharp is a powerful extension component for Aspose.SVG for .NET that expands its functionality by leveraging the SkiaSharp library for drawing and comprehensive conversion of SVG files. This extension enhances the capabilities of Aspose.SVG for .NET by providing seamless integration with SkiaSharp’s advanced features, resulting in faster drawing, high-quality rendering, and versatile SVG conversion options.
Key Features
Discover how Aspose.SVG.Drawing.SkiaSharp enhances the functionality of Aspose.SVG for .NET by leveraging the SkiaSharp library for drawing and comprehensive conversion of SVG files. Convert SVG files to popular raster formats and leverage advanced image filters, shaders, and effects for visually enhanced graphics. Seamlessly integrate SkiaSharp into your .NET Apps and enjoy faster drawing capabilities and multiplatform support. Explore the key features and learn how to activate this powerful feature with a simple code snippet.
Comprehensive SVG Conversion
- Aspose.SVG.Drawing.SkiaSharp enables conversion of SVG files to popular raster formats, including PNG, JPEG, TIFF, GIF, BMP and WEBP.
- It also offers robust capabilities for converting SVG files to PDF and XPS formats, ensuring seamless integration into your existing workflows.
Enhanced Drawing Capabilities
- By utilizing SkiaSharp, this extension provides faster and more efficient SVG drawing capabilities.
- It supports a wide range of advanced image filters, shaders, and effects for enhancing the visual output of SVG graphics.
- Features such as blurring, sharpening, color adjustments, gradients, and custom shader effects enable you to create visually stunning and engaging SVG documents.
Multiplatform Support
- Aspose.SVG.Drawing.SkiaSharp is developed for .NET Standard 2.0, making it compatible with a wide range of .NET platforms.
- It seamlessly works with various operating systems, including MS Windows (32-bit and 64-bit), macOS (10.12+), and Linux, wherever .NET Framework, Mono, or .NET Core is installed.
- This multiplatform support ensures flexibility and accessibility for developers across different environments.
Example of Using Aspose.SVG.Drawing.SkiaSharp
To activate the Aspose.SVG.Drawing.SkiaSharp feature, simply include the following code snippet in your application:
1Aspose.Svg.Configuration.SetExtension(new SkiaModule());
After activating this feature, all SVG document conversions and drawings will be performed using the SkiaSharp library, leveraging its powerful capabilities for enhanced rendering and conversion. Here’s an illustration on how to convert SVG files to PNG:
1using Aspose.Svg;
2using System.IO;
3using Aspose.Svg.Saving;
4using Aspose.Svg.Converters;
5using Aspose.Svg.Drawing.SkiaSharp;
6
7 // Initilize SkiaSharp-based drawing engine
8 Aspose.Svg.Configuration.SetExtension(new SkiaModule());
9
10 // Initialize an SVG document from a file
11 using (var document = new SVGDocument(Path.Combine(DataDir, "source.svg")))
12 {
13 // Create an instance of the ImageSaveOptions class
14 var pngSaveOptions = new ImageSaveOptions();
15
16 // Convert SVG to PNG
17 Converter.ConvertSVG(document, pngSaveOptions, Path.Combine(OutputDir, "result.png"));
18 }
About SkiaSharp
SkiaSharp is an open-source 2D graphics API, stemming from Google’s Skia library. It is renowned for its high-quality rendering capabilities. By availing advanced graphics features and APIs, SkiaSharp is perfect for mobile apps, games, and even server applications.
Notice:
Please note that Aspose.SVG.Drawing.SkiaSharp is currently available as a beta version. We are actively working on finalizing and testing the release version, which will be available soon. Stay tuned for the official release announcement to take full advantage of this exciting new feature.
The combination of Aspose.SVG and SkiaSharp through Aspose.SVG.Drawing.SkiaSharp empowers developers to deliver high-quality SVG rendering, advanced image effects, and comprehensive SVG conversion options, all while benefiting from the performance and flexibility provided by SkiaSharp and the rich functionality of Aspose.SVG for .NET.