Skip to main content

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 <code[atmark]lsnl.jp>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rgbconv-1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rgbconv-1.2-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl (9.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.5+ x86-64

File details

Details for the file rgbconv-1.2.tar.gz.

File metadata

  • Download URL: rgbconv-1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for rgbconv-1.2.tar.gz
Algorithm Hash digest
SHA256 5ac5b446c6c23c111a0cced68ffff418991a13e3dd5e7e1e14e60c9985c9fb8f
MD5 ba54cd621c238894a17a1e0c4bfc363f
BLAKE2b-256 5feeedd6128d2ae165cac6c8dc2bb2bc16b3ae06d3c91806037bc60157629213

See more details on using hashes here.

File details

Details for the file rgbconv-1.2-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for rgbconv-1.2-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5ae2ebde3758c95b6244478167f89d3b79d874e557fc3abde0a031973ece35d6
MD5 7fcbae5e3a356f8dfe1bcacc4454dc78
BLAKE2b-256 1314eca78124244b866b90a1d6cac26c10e51e5f8aff5128d3cfef533befbca3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page