semvec/pypi-packages huggingface dataset:
pybinpack 0.1.0
Package any binary tool as a Python package — effortlessly.
Requires Python: >=3.9

# pybinpack

[![PyPI - Version](https://img.shields.io/pypi/v/pybinpack.svg)](https://pypi.org/project/pybinpack)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pybinpack.svg)](https://pypi.org/project/pybinpack)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FlavioAmurrioCS/pybinpack/main.svg)](https://results.pre-commit.ci/latest/github/FlavioAmurrioCS/pybinpack/main)

-----

## Table of Contents

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install pybinpack
```

## License

`pybinpack` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
trim-hwc-ndarray 0.1.0a0
A simple utility for trimming borders from images represented as HWC ndarrays, based on the color value of a specified corner.
Requires Python: >=2

# `trim-hwc-ndarray`

A simple utility for trimming borders from images represented as HWC ndarrays, based on the color value of a specified
corner.

## Features

- **Trim uniform borders** from an HWC ndarray in which the border pixels match the color of a specified corner.
- Flexible selection of **which corner to use as the background color**.
- Preserves image channels and returns a trimmed copy.

## Installation

```bash
pip install trim-hwc-ndarray
```

## Usage

```python
# coding=utf-8
from __future__ import print_function
from trim_hwc_ndarray import trim_hwc_ndarray, Corner
import numpy as np

# Example: Trim a border from a 3x3 RGB image
img = np.array([
    [[255, 255, 255], [255, 255, 255], [255, 255, 255]],
    [[255, 255, 255], [0, 0, 0], [255, 255, 255]],
    [[255, 255, 255], [255, 255, 255], [255, 255, 255]]
])
trimmed_img = trim_hwc_ndarray(img, Corner.TOP_LEFT)
print(trimmed_img.shape)  # Output: (1, 1, 3)
```

## Contributing

Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.

## License

This project is licensed under the [MIT License](LICENSE).