Skip to main content

cropimage

PyPI version

cropimage is a simple toolkit for image cropping. Different from other projects that mainly tackle face region, we extend to all kinds of images such as landscape. We support horizontal and portrait size and generate a square output.

Installation

pip install cropimage

Get Started

from cropimage import Cropper

cropper = Cropper()

# Get a Numpy array of the cropped image
# Set completeness to be False if you expect the 'person' to be complete rather than 'face'
# Set target_size to be a tuple (size, size), only square output is supported now,
result = cropper.crop('./images/input.jpg')

# Save the cropped image
cv2.imwrite('cropped.jpg', result)

More Results

Contributing

If you find any issue of this project, feel free to open an issue or contribute!

Release files for cropimage 0.0.6

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

Source distribution (sdist)

Source distribution for cropimage 0.0.6
File Size Uploaded
cropimage-0.0.6.tar.gz 29.7 MB Details

Built distribution (wheel)

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

Total release size: 29.7 MB

Release files / cropimage-0.0.6.tar.gz

Download URL cropimage-0.0.6.tar.gz
Size 29.7 MB
Tags Source
SHA-256 checksum
How to use checksums
3be2a56f480f1f28e599699ab7ef5912b56ca166fa682442a69318426f5ef84f
BLAKE2b-256 checksum
How to use checksums
7dc09bc8ba796e52781ed52481089250fbcec450fbb2b9c28414935f76ad6cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.9

Release files / cropimage-0.0.6-py3-none-any.whl

Download URL cropimage-0.0.6-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffbcd4818ffee5cc9eab8ff3452c26dae119daea417826b34a8a73062ad2d657
BLAKE2b-256 checksum
How to use checksums
e7925d2c21ebc9789f2cae8d42ec40570aeafb4adf0d2adf63053c992ab32e37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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