Python bindings for AutoTrace.
Project description
PyAutoTrace
Python bindings for AutoTrace.
Requirements
- Python 3.8 or higher
Installation
python -m pip install pyautotrace
Usage
import numpy as np
from autotrace import Bitmap, VectorFormat
from PIL import Image
# Load an image.
image = np.asarray(Image.open("image.jpeg").convert("RGB"))
# Create a bitmap.
bitmap = Bitmap(image)
# Trace the bitmap.
vector = bitmap.trace()
# Save the vector as an SVG.
vector.save("image.svg")
# Get an SVG as a byte string.
svg = vector.encode(VectorFormat.SVG)
Building
If you wish to build the package from source, clone the repository and follow the instructions for your platform below.
Linux and MacOS
sh ./scripts/build_unix.sh
A virtual environment will be created using your default Python installation.
Compilation requires GLib, pkg-config, and unzip to be installed on your system, which most Linux distributions include by default.
On MacOS you can install GLib with brew install glib
.
Windows
.\scripts\build_windows.ps1
A virtual environment will be created using your default Python installation. In order to compile the generated C code, you will need to have Visual C++ Build Tools or another C/C++ compiler installed.
TODO
- Tests
- Documentation
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyautotrace-0.0.4-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49c3108c21c53afc1c3be2e3478af424d5bc28a93ceb35f44b13504beb6db7cf |
|
MD5 | 3eb9e1322f8a520901fa37066fa96ed0 |
|
BLAKE2b-256 | f97873cfa6dfe6fc198ff6b8c87e68a82b3ed1a6f27ebb21b6208444d8ce92ee |
Hashes for pyautotrace-0.0.4-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00fa4b06fdbf1cc91920d2b05125c7844114e7f365100fecc27e08000c9423ee |
|
MD5 | 7ec36a7802291408cb9bc77b5071f034 |
|
BLAKE2b-256 | b3ed889db4d064f63a3668bacc6f9f09e26d12cb315d09b8933ad2ef55217433 |
Hashes for pyautotrace-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfbcf8dd0e9073fb6fd68e34c68c616418c4c5de1a6e76fa4ea5d0f292cd534 |
|
MD5 | 6991183d0e1e7963a9ddf1e2687fce09 |
|
BLAKE2b-256 | 1f06f7ee68576c621fcdcdfcbe22a72f5754c4b3744fc5df9df1747ab9c339d0 |
Hashes for pyautotrace-0.0.4-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b45b58a64f63342acf721d78f04646f6fd4766ef6351d047e0c05c89d0983bff |
|
MD5 | 6a5b62a4327c72ee472dcf523eb8c247 |
|
BLAKE2b-256 | cd8930434f25d4d4fd68221f5571820724cbcf98f5ad163493f32b000fdcf46e |
Hashes for pyautotrace-0.0.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21e92db84b3dd36baaa4e81d26801fba740a4861c3fea6211963fb9ded542e51 |
|
MD5 | fbbce82c73fd6f2f965214fa9bbee85d |
|
BLAKE2b-256 | 7ddddfd05796ca0d5beb297af3b3ba7da2dbc7f3660645a0617d1358c68662a2 |
Hashes for pyautotrace-0.0.4-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb2cb1fd3b52fa79f374cef4e18670aedd2d86cdf318b238ce45037ad41a69b |
|
MD5 | cc7fc1468a4ebb0e8771633e0ea92d17 |
|
BLAKE2b-256 | f0157a66d5a1f62e3e71996c8cae68de4e896b5a4b0b67608f610bcaca873635 |
Hashes for pyautotrace-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c9c5bdc3c93235f1bd69ab9e200b52d37eb1b01da43a594a0652a88a642c5e9 |
|
MD5 | ac18733863649266ec63277f3806d3c4 |
|
BLAKE2b-256 | 5bd40a32141a9815f89bb95483696ff16d03b66c26278a96cbd3fed62ae26829 |
Hashes for pyautotrace-0.0.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad6db5a260389ba37a3cc368f20c445c7e98621186933fbb15a63e071ac7a7f7 |
|
MD5 | a71ce7da28444ee80e71dde399ed8370 |
|
BLAKE2b-256 | 588b4e11ab5a5f4653ca67b2c87bf11ab579d8dacad14929aa5d7c7155f59a4f |
Hashes for pyautotrace-0.0.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9153109ec62254f33426933e37699bf0a604e139c7e4d81e101b79e7aed75351 |
|
MD5 | b795b92bb9fc7688d8fcb995cc54a2ee |
|
BLAKE2b-256 | d02191dc2424041e45258ad914909b08ed859c7cbb793da1238eb117103acaaa |
Hashes for pyautotrace-0.0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e56f9113a6179505bb7508be486f90ea3e4322c959b75c47e271d522a3d29d |
|
MD5 | 8811e16aac00d7ccad4f5e0a24043cf0 |
|
BLAKE2b-256 | 3bc2610190c254248057524ab37dfb2b911513be4af55abedf50988804d7f8ee |
Hashes for pyautotrace-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 870ca061ee24d48825e3a0c6bad433c21d140e4f31b6259eaa49eb48e1bb37ae |
|
MD5 | 78e8f48084dba6dc24f9c7beed58749c |
|
BLAKE2b-256 | 46e077f3baf2584bc59a5199b1a72223464b670887ca2192854bd977d4dc3ebd |
Hashes for pyautotrace-0.0.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 159cf6096c1519cbf6e105a52ef86f18cc49014c2a57c20f742194932bee3bfe |
|
MD5 | 3b4e58f304de829abfa03398419c2b0c |
|
BLAKE2b-256 | 6e684419398f79d6baa6a412ccc09887145b24170a0f2f095a06bd531cef2520 |
Hashes for pyautotrace-0.0.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 162b9062ad3bb4ffcc0859f34bb3cfb49a3df5de09715883abb37c3d3922e805 |
|
MD5 | 838f20f965114bd1eda83792577c0f5a |
|
BLAKE2b-256 | 6fca6bc0144b7c97c0333d0db197fa86471979a716d3780b833830e076288f2b |
Hashes for pyautotrace-0.0.4-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406deee0008306ddc3f7424a392dc334b4b5b6ae8c1a4e2b5a86e9f5b0f890a6 |
|
MD5 | 946f10684aba7d2bc2b0d995c86d5911 |
|
BLAKE2b-256 | 952558e99acd6d2e11179b8da58a5efd47dd2c3fe16dae1e2ac1b019c2a84192 |
Hashes for pyautotrace-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9729076ab0d80550f1f076382a4d04785d79a95ea763649baaf90fc11a6c181 |
|
MD5 | faa55ee9fa2a4814dd92e67f98d146c8 |
|
BLAKE2b-256 | 20103ee008f190b040ba4142dbcb7b2b49f0c239429e1e79301df73c967e5e3e |
Hashes for pyautotrace-0.0.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63049dc64264052bb8d6ae751067437c71e8ae3538d6ed688f9dfa2b8ad04c46 |
|
MD5 | 7a0cabf917bf5eb30d5261d06d5634cf |
|
BLAKE2b-256 | dce2fc0edcd66c3b25d8c67ccf9b3d3b9e74abd0e04d07fba9329f5c585fbc73 |
Hashes for pyautotrace-0.0.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71966c2f9b88fc7d66f287a0fef30b0f6f882351e032f8c5326d8e813446998d |
|
MD5 | 348925c03142a439e43536a8cb341fe1 |
|
BLAKE2b-256 | b5b384c7e8c18cb53828b0256b5fbb2edbd67269744db42bb6dff1e10749edca |
Hashes for pyautotrace-0.0.4-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36128fa0d8d7c47f68a6e4c377261c599399aa02952c369b48acae04b241eb58 |
|
MD5 | c928009d300391f2a423ff85aadafbac |
|
BLAKE2b-256 | b2b70630b0005e1c53a7984fa0212baa07e008c36dd2259d596f1502b6dbc115 |
Hashes for pyautotrace-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8902e9b4b6062d08931030e159078e3625967686e339c662904307fd6880d16 |
|
MD5 | 51f9a80fc19a194f5ce585f3a49d96d7 |
|
BLAKE2b-256 | ca540b45e3a51e92fd0e3b56fdada0ef01bf10d3ead04f4183be7384d68ce9e6 |
Hashes for pyautotrace-0.0.4-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24a3c991258b87976c4d7729fb9da3c2a943533f03f9ec67e9d6fb2d2696074c |
|
MD5 | 5ef3d96561b4b5d368e08dddd9599186 |
|
BLAKE2b-256 | 908c0947479f05db4ee8553d467aeff531fa3046006f61f4e7d270cc54e3f746 |