Image Input Handler
image-input-handler is a versatile Python package designed to simplify the handling of various image inputs. It supports images from multiple sources including file paths, URLs, and base64 encoded strings. It adjusts image channels according to user needs and includes functionality for checking compatibility and enabling debug mode, making it an essential tool for projects involving image processing.
Features
- Handle images from URLs, file paths, and base64 strings.
- Automatic adjustment of image channels.
- Support for image masks.
- Compatibility checks to ensure image inputs can be processed.
- Debug mode for detailed operational logging, aiding in troubleshooting and development.
- Easy integration with popular libraries such as NumPy, OpenCV, and PIL.
Installation
Install image-input-handler using pip:
bash pip install image-input-handler
Usage
Below is a basic example of how to use image-input-handler:
from image_input_handler import UniversalImageInputHandler
# Initialize the handler with a local file path, enabling debug mode
handler = UniversalImageInputHandler('path/to/your/image.png', debug=True)
# For URL based images
url_handler = UniversalImageInputHandler('http://example.com/image.png')
# For base64 encoded images
base64_handler = UniversalImageInputHandler('base64_encoded_string_here', img_is_a_mask=True)
# Access the processed image
processed_image = handler.img
# Check if the image is compatible
if handler.COMPATIBLE:
print("The image is compatible.")
else:
print("The image is not compatible.")
Metadata
Release files for image-input-handler 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| image_input_handler-0.4.0.tar.gz | 4.1 kB | Without provenance | Details for image_input_handler-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| image_input_handler-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for image_input_handler-0.4.0-py3-none-any.whl |
Total release size: 8.1 kB
Release files / image_input_handler-0.4.0.tar.gz
| Download URL | image_input_handler-0.4.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c5866f1b9709d868f941c4be5f42e17c23443187aed9675f2c7d193bd3f3342
|
|
BLAKE2b-256 checksum How to use checksums |
e533fd4c5bb742851a1931cb1e274f26e4107b74a7a6d7169d6e159962711edc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / image_input_handler-0.4.0-py3-none-any.whl
| Download URL | image_input_handler-0.4.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92a9819786585e8d229424014d6cd325473219aaf7db8835e3341058396680db
|
|
BLAKE2b-256 checksum How to use checksums |
7c419a8f709e6ceb46221a87e15cb3ffb121672d9618f5f32837082448d77e9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Security for image-input-handler 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.