fast RGB image pixel format conversion module written in C
Project description
NAME
rgbconv - Fast RGB image pixel format conversion module written in C
DESCRIPTION
This manual page documents rgbconv module, a Python module for rapidly converting image pixel format from BGRA (Blue, Green, Red, and Alpha) to RGBA (Red, Green, Blue, and Alpha).
Different aplications/modules use different pixel formats for represenging pixels in images and photos. One of the most popular formats are 24-bit RGB (8 bits each for red, green, and blue) and 32-bit RGBA (8 bits each for red, green, blue, alpha). Other formats include 32-bit BGRA (8 bits for blue, green, red, and alpha) and 32-bit RGBX (8bits for red, gree, blue, and unused).
rgbconv provides bgra2rgba, which rapidly converts from the BGRA format to the RGBA format. rgbconv is implemented in C language for achieving the almost optimal performance.
EXAMPLES
import rgbconv
img = b'01234567890abcdef'
rgbconv.bgra2rgba(img)
print(img)
WARNING
rgbconv directly modifies a byte-like object in Python for the maximal performance even if the object is immutable, which may cause problems. Use rgbconv module with caution.
INSTALLATION
pip3 install rgbconv
AVAILABILITY
The latest version of rgbconv module is available at PyPI (https://pypi.org/project/rgbconv) .
SEE ALSO
AUTHOR
Hiroyuki Ohsaki <ohsaki[atmark]lsnl.jp>
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
File details
Details for the file rgbconv-1.1.tar.gz
.
File metadata
- Download URL: rgbconv-1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92403115b7ca0d96fd17e15ead5703335a0a87ff9aacfe3f0d019db900c6997 |
|
MD5 | 0409f70680d268ae053501bcd06a6242 |
|
BLAKE2b-256 | 18feecd01c0ca0ca1a35507251f15232a8289e9b45bc0409240cd052cf491f8f |
File details
Details for the file rgbconv-1.1-py3.7-linux-x86_64.egg
.
File metadata
- Download URL: rgbconv-1.1-py3.7-linux-x86_64.egg
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b169b94fa0438efb9c464e7c0f69fb08fc57ffe9142b50ea84a00a5087a621f3 |
|
MD5 | a8f14b8fb8805f044d45c9293ef0fb44 |
|
BLAKE2b-256 | d687392eee1bceec16747fd084f365c00e942281a0b429e79c8b81fe03b6df9d |