55 unsigned ro,
unsigned go,
unsigned bo,
56 unsigned rw,
unsigned gw,
unsigned bw,
57 ByteOrder _byte_order)
60 byte_order(_byte_order),
82 word |=
p[
i] << (8 *
i);
96 p[
i] = (word >> (8 *
i)) & 0xFF;
99 p[
i] = (word >> (8 * (
length -
i - 1))) & 0xFF;
static const PixelConverter rgb565_be
Predefined 16-bit RGB565 (red in least significant bits, big endian) conversion helper.
ByteOrder byte_order
Byte order when stored to memory.
static const PixelConverter rgba8888_le
Predefined 32-bit RGB (red in least significant bits, 8 bits/channel, little endian) conversion helpe...
PixelConverter(unsigned length, unsigned ro, unsigned go, unsigned bo, unsigned rw, unsigned gw, unsigned bw, ByteOrder byte_order=ByteOrder::little)
static const PixelConverter rgba8888_be
Predefined 32-bit RGB (red in least significant bits, 8 bits/channel, big endian) conversion helper.
static const PixelConverter rgb565_le
Predefined 16-bit RGB565 (red in least significant bits, little endian) conversion helper.
unsigned length
Bytes per pixel when stored in memory (including padding)
void writeWord(uint8_t *p, uint32_t word) const
Write a word of a given length and endianness to memory.
uint32_t readWord(const uint8_t *p) const
Read a word of a given length and endianness from memory.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Channel(unsigned offset, unsigned width)