Metadata-Version: 2.4
Name: hwc-bgrx-8888-ndarray-to-pil-image
Version: 0.1.0a0
Summary: Convert an HWC BGR 888 or BGRX 8888 NumPy ndarray to an HWC RGB 888 PIL.Image, with the alpha/unused channel discarded.
Author-email: Jifeng Wu <jifengwu2k@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/jifengwu2k/hwc-bgrx-8888-ndarray-to-pil-image
Project-URL: Bug Tracker, https://github.com/jifengwu2k/hwc-bgrx-8888-ndarray-to-pil-image/issues
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=2
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pillow
Dynamic: license-file

# `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

```commandline
pip install hwc-bgrx-8888-ndarray-to-pil-image
```

## Usage

```python
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](LICENSE).
