A simple tool for converting PNG images into a binary RGB565 format compatible with OpenMSLA displays.
Clone the repository and install the required dependencies:
git clone https://github.com/OpenMSLA/image-converter.git
cd image-converter
pip install -r requirements.txtConvert a PNG image to the RGB565 format:
py main.py input.png output.rgb565The converter supports two output formats:
- Without transparency — RGB565 color data only.
- With transparency — RGB565 color data with an additional alpha channel.
Both formats use the same 5-byte header. All multi-byte values are stored in little-endian byte order.
| Field | Type | Description |
|---|---|---|
| Image width | u16 |
Image width in pixels |
| Image height | u16 |
Image height in pixels |
| Flags | u8 |
Format flags |
The flags field is a bitmask:
| Bit | Description |
|---|---|
| 0 | Indicates whether the image uses transparency |
| 1–7 | Reserved for future use |
The image data immediately follows the header.
The payload format depends on whether transparency is enabled:
- Without transparency: 2 bytes per pixel (RGB565).
- With transparency: 3 bytes per pixel (RGB565 + 1-byte alpha channel).
The alpha channel uses 8-bit values, where 0 is fully transparent and 255 is fully opaque.
by AndcoolSystems under OpenMSLA project, 21 November, 2026