Metadata-Version: 2.4
Name: pyautotrace
Version: 0.0.7
Summary: Python bindings for AutoTrace.
Author-email: Lemonyte <contact@lemonyte.com>
License-Expression: LGPL-2.1-or-later
Project-URL: Repository, https://github.com/lemonyte/pyautotrace
Keywords: autotrace,bitmap,graphics,tracing,vector
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
License-File: LICENSE-autotrace.txt
Dynamic: license-file

# PyAutoTrace

Python bindings for [AutoTrace](https://github.com/autotrace/autotrace).

## Installation

Install PyAutoTrace using your package manager of choice.

```shell
uv add pyautotrace[standard]
```

```shell
python -m pip install pyautotrace[standard]
```

## Usage

```python
import numpy as np
from autotrace import Bitmap, VectorFormat
from PIL import Image

# Load an image.
image = np.array(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

See the [contribution guide](https://pyautotrace.lemonyte.com/contributing/#building-from-source) for instructions to build PyAutoTrace from source.

## TODO

- Tests

## License

This project is licensed under the [LGPLv2.1](LICENSE.txt) license.

See the [documentation](https://pyautotrace.lemonyte.com/#license) for details about the licenses of upstream and included code.
