Vectorize from Base64 – Aspose.HTML Cloud
This article explains how to vectorize Base64-encoded images into SVG format using Aspose.HTML Cloud API. Supported image formats include PNG, JPEG, JPG, BMP, GIF, and WEBP.
Before starting, ensure you have an authorization token. Refer to the Authorization Guide for details.
Base64 Vectorization Methods
Aspose.HTML Cloud provides two vectorization methods:
- Synchronous Vectorization: Immediate response containing the vectorized SVG file.
- Asynchronous Vectorization: Recommended for larger files; the operation runs in the background.
Synchronous Base64 Image to SVG Vectorization
Endpoint: POST https://api.aspose.cloud/v4.0/html/vectorization/png/sync
Authorization: Bearer token
Request Body:
1{
2 "InputBase64": "BASE64_ENCODED_IMAGE_CONTENT",
3 "Options": {
4 "ErrorThreshold": 20,
5 "MaxIterations": 50,
6 "ColorLimit": 8,
7 "LineWidth": 1.0
8 }
9}
Response: Vectorized SVG file as a binary stream.