Pre-release
This release is a pre-release and may not be stable for production use.
hwc-bgrx-8888-ndarray-to-pil-image
Convert an HWC BGR 888 or BGRX 8888 NumPy ndarray to an HWC RGB 888 PIL.Image, with the alpha/unused channel discarded.
This function helps bridge interoperability between Qt, OpenCV (which often use HWC BGRX 8888 images), and PIL.
Installation
pip install hwc-bgrx-8888-ndarray-to-pil-image
Usage
import numpy as np
from hwc_bgrx_8888_ndarray_to_pil_image import hwc_bgrx_8888_ndarray_to_pil_image
# Example: create a dummy BGRX image
hwc_bgrx = np.random.randint(0, 256, (224, 224, 4), dtype=np.uint8)
pil_image = hwc_bgrx_8888_ndarray_to_pil_image(hwc_bgrx) # <PIL.Image.Image image mode=RGB size=224x224>
pil_image.show()
Contributing
Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.
License
This project is licensed under the MIT License.
Release files for hwc-bgrx-8888-ndarray-to-pil-image 0.1.0a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hwc_bgrx_8888_ndarray_to_pil_image-0.1.0a0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hwc_bgrx_8888_ndarray_to_pil_image-0.1.0a0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / hwc_bgrx_8888_ndarray_to_pil_image-0.1.0a0.tar.gz
| Download URL | hwc_bgrx_8888_ndarray_to_pil_image-0.1.0a0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9591ffbe48c56885d6dc03ef9790abdcd8e852d6339b6a4f7995d9c0d7bedb17
|
|
BLAKE2b-256 checksum How to use checksums |
60cd52eaab5287d636d4c0802ba7377693ada5e75bf924bc1f8fdb4c21dc9882
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / hwc_bgrx_8888_ndarray_to_pil_image-0.1.0a0-py2.py3-none-any.whl
| Download URL | hwc_bgrx_8888_ndarray_to_pil_image-0.1.0a0-py2.py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6f80b1f07b3183661d3eb5e0699bf35bcb662c1b5f95985ebe0c7f3c2d2f03dd
|
|
BLAKE2b-256 checksum How to use checksums |
3951e7c225870b9ac20597640647213206d1c72ec0bad6449d0b37e086af112a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|