Skip to main content

ipolypad

Convert an image or SVG into a padded polygon hull suitable for CSS shape-outside and HTML/canvas text-wrap engines. Reference implementation. Positive padding dilates the silhouette; negative padding erodes it.

See the project root README.md and SPEC.md for the full design. This package is the Python side — smart, batteries-included, multi-format output.

Install

uvx ipolypad trace dragon.svg --pad 6 --max-points 32 --out dragon.json
# or
uv pip install ipolypad

CLI

ipolypad trace <src> [--size 200] [--pad 6] [--max-points 32] \
                     [--hull / --no-hull] [--format json,css,svg,png,html] \
                     [--enhance / --no-enhance] [--bg-tolerance 12] \
                     [--selector .figure] [--out path]

ipolypad batch '*.svg' --out-dir dist/ [trace options...]

src may be a local path, an http(s):// URL, or a data: URL.

Library

from ipolypad import trace

result = trace("dragon.svg", size=200, pad=6, max_points=32, format="json")
print(result["points"])

Output

Default JSON:

{
  "src": "dragon.svg",
  "raster": { "width": 200, "height": 200, "pad": 6 },
  "max_points": 32,
  "n_points": 18,
  "points": [[0.500000, 0.020000], ...]
}

points are normalized 0..1 against the rasterization box, six decimals, no trailing closing vertex (polygon is implicitly closed).

License

Apache-2.0. See LICENSE.

Metadata

Release files for ipolypad 1.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipolypad 1.0.11
File Size Uploaded Provenance Actions
ipolypad-1.0.11.tar.gz 14.8 kB With provenance Details for ipolypad-1.0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ipolypad 1.0.11
File Interpreter ABI Platform Actions
ipolypad-1.0.11-py3-none-any.whl Python 3 none any Details for ipolypad-1.0.11-py3-none-any.whl

Total release size: 33.0 kB

Release files / ipolypad-1.0.11.tar.gz

Download URL ipolypad-1.0.11.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eabb5c9fb2df8ae29f688d7128cf9498bbec582a292fa84c062acc18be83e109
BLAKE2b-256 checksum
How to use checksums
1d1ac66fc93bacee4831624b600c7d61d588649dcb4001fcb081d7a02f992b89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / ipolypad-1.0.11-py3-none-any.whl

Download URL ipolypad-1.0.11-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32ab5c76bf8e76e9b79d2de2d693bbd2963e66d0d14cc39183ff966949926e9b
BLAKE2b-256 checksum
How to use checksums
8fa6796c8bdd3ff3d3a69fe95164a3cfb8aa57269d357e8ff8d22920a5870289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for ipolypad 1.0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ipolypad-1.0.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page