-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert_png2svg.sh
39 lines (31 loc) · 997 Bytes
/
convert_png2svg.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## install OS tools
# sudo apt-get install potrace imagemagick
# pngPath = "samples/invoice1.png"
# bmpPath = "samples/invoice1.bmp"
# svgPath = "samples/invoice1.svg"
# # step-1
# #// Convert PNG to BMP
# convert samples/invoice1.png samples/invoice1.bmp
# # step-2
# #// Convert BMP to SVG using Potrace
# potrace -s samples/invoice1.bmp -o samples/invoice1.svg
#// Check if the output file exists
convert samples/shop_receipt_sample1.png samples/shop_receipt_sample1.bmp
potrace -s samples/shop_receipt_sample1.bmp -o samples/shop_receipt_sample1.svg
# POST https://v2.convertapi.com/convert/jpg/to/svg?Secret=your-api-secret
# Content-Type: application/json
# {
# "Parameters": [
# {
# "Name": "File",
# "FileValue": {
# "Name": "my_file.jpg",
# "Data": "<Base64 encoded file content>"
# }
# },
# {
# "Name": "StoreFile",
# "Value": true
# }
# ]
# }