Skip to main content

QCrop

A basic PyQt image cropping tool.

Install

pip install qcrop

Usage

As an application

Start with the command:

qcrop path/to/image.ext

The supported image formats are those handled by the Qt framework: BMP, GIF, JPG, PNG, PBM, PGM, PPM, XBM and XPM.

As a python module

Sample code:

from PyQt5.QtGui import QPixmap
from qcrop.ui import QCrop

original_image = QPixmap(...)
crop_tool = QCrop(original_image)
status = crop_tool.exec()

if status == Qt.Accepted:
    cropped_image = crop_tool.image
# else crop_tool.image == original_image

User interface

Use the mouse to select the image area to crop. You can also use the X, Y, Width and Height fields to precisely adjust the area (you can use mouse wheel hovering the field).

Click the reset button to set the crop area to the full image.

Once done click ok to validate the crop, cancel to go back to the original image.

screenshot

Release files for qcrop 0.0.1

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

Source distribution (sdist)

Source distribution for qcrop 0.0.1
File Size Uploaded
qcrop-0.0.1.tar.gz 7.5 kB Details

Built distribution (wheel)

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

Total release size: 28.3 kB

Release files / qcrop-0.0.1.tar.gz

Download URL qcrop-0.0.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5f72344ba37222ef6fdb5a771d3eef648f45128a440261d6694151b01c932e5c
BLAKE2b-256 checksum
How to use checksums
78e35ce68f2542fae9bda9cb855c53d4cb2a23f3850d8ce1cc26c656dd5ba5a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release files / qcrop-0.0.1-py3-none-any.whl

Download URL qcrop-0.0.1-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c620d38985b9306bb527348a63334a5b14bf54536f076a5568f548ad2efb3ba0
BLAKE2b-256 checksum
How to use checksums
c8eb1a7a4635cd5e12caf648a6021b83f0f3b386a3b1198de730f61988371065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

0.0.0

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