A basic PyQt image cropping tool
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qcrop-0.0.1.tar.gz.
File metadata
- Download URL: qcrop-0.0.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f72344ba37222ef6fdb5a771d3eef648f45128a440261d6694151b01c932e5c
|
|
| MD5 |
91378192cdbce3f47e95521b51901fee
|
|
| BLAKE2b-256 |
78e35ce68f2542fae9bda9cb855c53d4cb2a23f3850d8ce1cc26c656dd5ba5a1
|
File details
Details for the file qcrop-0.0.1-py3-none-any.whl.
File metadata
- Download URL: qcrop-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c620d38985b9306bb527348a63334a5b14bf54536f076a5568f548ad2efb3ba0
|
|
| MD5 |
d667bfead6043d9dcbb9f6e0077e2238
|
|
| BLAKE2b-256 |
c8eb1a7a4635cd5e12caf648a6021b83f0f3b386a3b1198de730f61988371065
|