Skip to main content

Image resize and background-removal transformations (Pillow + OpenCV)

Project description

image-transformations

Image resize and background-removal transformations built on Pillow and OpenCV — ratio-safe and fill-crop resizes with white/black/pink/transparent backgrounds, plus kernel- and flood-fill-based background removal.

Installation

pip install entirius-py-image-transformations

Usage

from image_transformations import resize_ratio_safe_bg_white, remove_background_flood_fill

resize_ratio_safe_bg_white("in.jpg", "out.jpg", 500, 500)
remove_background_flood_fill("in.jpg", "out.png")

Development

make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest) — smoke transformations over tests/examples/

Development and agent instructions: AGENTS.md.

License

Mozilla Public License 2.0 — see 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

entirius_py_image_transformations-2.0.0.tar.gz (708.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file entirius_py_image_transformations-2.0.0.tar.gz.

File metadata

  • Download URL: entirius_py_image_transformations-2.0.0.tar.gz
  • Upload date:
  • Size: 708.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for entirius_py_image_transformations-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8cd520fee179d79198d9f75c3e493e8811bf7d845ff3c96c69cb1773c991a5bd
MD5 f5e3af12dc296f9603f45bf969073e45
BLAKE2b-256 c4c56ae515dbaf527e490bab1688964f0048860c515e14837fb13998f11e2032

See more details on using hashes here.

File details

Details for the file entirius_py_image_transformations-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: entirius_py_image_transformations-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for entirius_py_image_transformations-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e0f43d67982e23ccddc56932c6a76286e49397ac82ce1417c5760cbe65373c7
MD5 1b99df074d1e1c7bf7798007b240f233
BLAKE2b-256 1266f4101e623b7f19d368eb4afc710d8a2aa7b81d40aec902d33a1e7842d08d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page