Vectorize the image file that is placed in the storage to a svg file in the storage.
Possible vectorization:
- JPEG, BMP, PNG, TIFF, GIF -> SVG
| Parameter | Type | Description |
|---|---|---|
| input_file | str | Full path to input image file for vectorization |
| output_file | str | Full path to output svg file with extension |
| storage_name | str | User's storage name. None if default |
| options | VectorizeOptions | Vectorize options (optional) |
from asposehtmlcloud.configuration import Configuration
from asposehtmlcloud.api.html_api import HtmlApi
from asposehtmlcloud.api_client import ApiClient as Client
from asposehtmlcloud.rest import ApiException
configuration = Configuration(apiKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
appSid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
basePath="https://api.aspose.cloud/v4.0",
authPath="https://api.aspose.cloud/connect/token",
debug=True)
client = Client(configuration)
html_api = HtmlApi(client)
try:
res = html_api.vectorize_storage_to_storage(input_file="test.png", output_file="test.svg",
storage_name=None)
except ApiException as ex:
print("Exception")
print("Info: " + str(ex))
raise exfrom asposehtmlcloud.configuration import Configuration
from asposehtmlcloud.api.html_api import HtmlApi
from asposehtmlcloud.api_client import ApiClient as Client
from asposehtmlcloud.rest import ApiException
configuration = Configuration(apiKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
appSid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
basePath="https://api.aspose.cloud/v4.0",
authPath="https://api.aspose.cloud/connect/token",
debug=True)
client = Client(configuration)
html_api = HtmlApi(client)
options = {
'error_threshold': 1,
'max_iterations': 50,
'colors_limit': 30,
'line_width': 1,
}
try:
res = html_api.vectorize_storage_to_storage(input_file="test.png", output_file="test.svg",
storage_name=None, options=options)
except ApiException as ex:
print("Exception")
print("Info: " + str(ex))
raise ex