{"id":15443460,"url":"https://github.com/lemonyte/pyautotrace","last_synced_at":"2025-10-17T03:31:15.033Z","repository":{"id":60171615,"uuid":"541409346","full_name":"lemonyte/pyautotrace","owner":"lemonyte","description":"Python bindings for AutoTrace, a bitmap to vector conversion library.","archived":false,"fork":false,"pushed_at":"2025-01-02T03:19:43.000Z","size":185,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-02T04:23:20.512Z","etag":null,"topics":["autotrace","bindings","bitmap","cython","graphics","image-processing","pypi-package","python","svg","tracing","vector","vector-graphics","vectorization"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyautotrace","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemonyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-26T04:38:32.000Z","updated_at":"2025-01-02T03:19:40.000Z","dependencies_parsed_at":"2023-11-12T06:26:39.720Z","dependency_job_id":"7f5814fc-b324-47cd-bf4a-2021aa1f3747","html_url":"https://github.com/lemonyte/pyautotrace","commit_stats":{"total_commits":155,"total_committers":4,"mean_commits":38.75,"dds":0.3290322580645161,"last_synced_commit":"650388372cc4f6686072837fcbce80d95e8085d4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpyautotrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpyautotrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpyautotrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemonyte%2Fpyautotrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemonyte","download_url":"https://codeload.github.com/lemonyte/pyautotrace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236769483,"owners_count":19201883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autotrace","bindings","bitmap","cython","graphics","image-processing","pypi-package","python","svg","tracing","vector","vector-graphics","vectorization"],"created_at":"2024-10-01T19:35:05.560Z","updated_at":"2025-10-17T03:31:09.768Z","avatar_url":"https://github.com/lemonyte.png","language":"Cython","readme":"# PyAutoTrace\n\nPython bindings for [AutoTrace](https://github.com/autotrace/autotrace).\n\n## Requirements\n\n- [Python 3.9](https://www.python.org/downloads/) or higher\n\n## Installation\n\nInstall PyAutoTrace using your package manager of choice.\n\n```shell\npython -m pip install pyautotrace\n```\n\n```shell\nuv add pyautotrace\n```\n\n## Usage\n\n```python\nimport numpy as np\nfrom autotrace import Bitmap, VectorFormat\nfrom PIL import Image\n\n# Load an image.\nimage = np.asarray(Image.open(\"image.jpeg\").convert(\"RGB\"))\n\n# Create a bitmap.\nbitmap = Bitmap(image)\n\n# Trace the bitmap.\nvector = bitmap.trace()\n\n# Save the vector as an SVG.\nvector.save(\"image.svg\")\n\n# Get an SVG as a byte string.\nsvg = vector.encode(VectorFormat.SVG)\n```\n\n## Building\n\nIf you wish to build the package from source, the easiest way to do so is with [uv](https://docs.astral.sh/uv/).\nClone the repository and run the following commands inside the project directory.\n\n```shell\n# Clone the AutoTrace submodule.\ngit submodule update --init\n\n# If you're on Windows, extract the GLib headers archive.\nExpand-Archive \"third-party\\autotrace\\distribute\\win\\3rdparty\\glib-dev_2.34.3-1_win64.zip\" -DestinationPath \"third-party\\glib\"\n\n# If you're on macOS, install GLib with Homebrew.\nbrew install glib\n\n# Build the package with uv.\nuv build\n```\n\nOn Linux and macOS compilation requires GLib, pkg-config, and unzip to be installed on your system, which most Linux distributions include by default.\nYou can install GLib on macOS with `brew install glib`.\n\nOn Windows, in order to compile the generated C code, you will need to have\n[Visual C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) or another C/C++ compiler installed.\n\n## TODO\n\n- Tests\n- Documentation\n\n## License\n\nThis project is licensed under the [LGPLv2.1](LICENSE.txt) license.\n\nThis project depends on the AutoTrace project, which is licensed under the [LGPLv2.1](https://github.com/autotrace/autotrace/blob/master/COPYING.LIB) license.\nAutoTrace, and by extension this project, requires the presence of GLib to compile, which is licensed under the [LGPLv2.1](https://github.com/GNOME/glib/blob/main/COPYING) license, but this project does not depend on GLib to run.\n\nThis project contains code that replaces portions of [AutoTrace](https://github.com/autotrace/autotrace) and [GLib](https://github.com/GNOME/glib), defined in [`overrides.cpp`](autotrace/overrides.cpp). Some of the implementations were taken directly from, or are based on, the source code of their respective libraries.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonyte%2Fpyautotrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemonyte%2Fpyautotrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonyte%2Fpyautotrace/lists"}