Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Aspose.SVG for Python via .NET enables creating, editing, rendering, and converting SVGs to formats like PNG, PDF, and more, excelling in image vectorization. Perfect for developing SVG tools.
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support
Aspose.SVG for Python via .NET is a powerful on-premise class library designed to seamlessly work with SVG files in a wide range of operations without the need for additional SVG manipulation tools. It allows you to create, edit, optimize, and convert SVG. Python API allows you to manipulate documents and elements and provides robust navigation and inspection functionalities, such as XPath queries and CSS selectors. Developers can also vectorize images and texts, apply SVG transformations, filters, gradients, and patterns, and specify colors in different color formats. Aspose.SVG for Python via .NET supports both Windows and Unix platforms, making it perfectly suited for building applications such as SVG editors, converters, mergers, and image vectorizers catering to developers who require extensive SVG processing capabilities.
The following are some popular features of Aspose.SVG for Python via .NET:
Aspose.SVG for Python via .NET is currently supported on Windows for developing applications where Python 3.6 or later is installed. You can build both 32-bit and 64-bit Python applications. Support for Linux and macOS X is planned for future versions.
Ready to give Aspose.SVG for Python via .NET a try?
Simply run pip install aspose-svg-net
from the Console to fetch the package.
If you already have Aspose.SVG for Python via .NET and want to upgrade the version, please run pip install --upgrade aspose-svg-net
to get the latest version.
You can run the following snippets in your environment to see how Aspose.SVG works, or check out the GitHub Repository or Aspose.SVG for Python via .NET Documentation for other common use cases.
Aspose.SVG for Python via .NET also allows you to convert SVG to PDF, XPS, PNG, JPEG, TIFF, WEBP, and other file formats. The following snippet demonstrates the conversion from SVG to PDF:
import aspose
from aspose.svg import *
from aspose.svg.converters import *
from aspose.svg.drawing.skiasharp import *
from aspose.svg.rendering import *
from aspose.svg.drawing import *
# Activate the Aspose.SVG.Drawing.SkiaSharp feature
Configuration.set_extension(SkiaModule())
options = PdfSaveOptions()
options.background_color = aspose.pydrawing.Color.transparent
options.page_setup.sizing = SizingType.FIT_CONTENT
options.horizontal_resolution = Resolution.from_dots_per_inch(96.0)
options.vertical_resolution = Resolution.from_dots_per_inch(96.0)
with SVGDocument("source.svg") as document:
# Convert SVG to PDF
Converter.convert_svg(document, options, "result.pdf")
Aspose.SVG for Python via .NET also allows you can convert a raster image to vector graphic using default or custom configuration options. You will be able to apply custom settings to get the best result of the image-to-vector conversion and save the output SVG file to your computer. The following snippet demonstrates the image vectorization:
import os
from aspose.svg import *
from aspose.svg.converters import *
from aspose.svg.drawing import *
from aspose.svg.rendering.image import *
from aspose.svg.imagevectorization import *
# Setup directories
input_folder = "path/to/input_folder/"
output_folder = "path/to/output_folder/"
if not os.path.exists(output_folder):
os.makedirs(output_folder)
# Configuration for vectorization
path_builder = BezierPathBuilder()
path_builder.trace_smoother = ImageTraceSmoother(2) # Example severity level
path_builder.error_threshold = 30.0 # Example threshold
path_builder.max_iterations = 30 # Example max iterations
vectorizer = ImageVectorizer()
vectorizer.configuration.path_builder = path_builder
vectorizer.configuration.colors_limit = 25 # Example color limit
vectorizer.configuration.line_width = 1.0 # Example line width
# Vectorize the image
src_file = "example_image.png" # Specify the test file
with vectorizer.vectorize(os.path.join(input_folder, src_file)) as document:
output_file = os.path.join(output_folder, src_file + ".svg")
document.save(output_file)
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
FAQs
Aspose.SVG for Python via .NET enables creating, editing, rendering, and converting SVGs to formats like PNG, PDF, and more, excelling in image vectorization. Perfect for developing SVG tools.
We found that aspose-svg-net demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.