bytesToColors

Undocumented in source. Be warned that the author may not have intended to support it.
ColourFormat[]
bytesToColors
(
ColourFormat = RGB888
)
(
const ubyte[] data
,)
if (
isColourFormat!ColourFormat
)

Examples

assert(bytesToColors([0xA9, 0xFF], SupportedFormat.bgr555) == [RGB888(72, 232, 248)]);
assert(bytesToColors([0xA9, 0xFF, 0x0, 0x0], SupportedFormat.bgr555) == [RGB888(72, 232, 248), RGB888(0, 0, 0)]);
assert(bytesToColors([0xA9, 0xFF], SupportedFormat.bgr565) == [RGB888(72, 244, 248)]);
assert(bytesToColors([72, 244, 248], SupportedFormat.rgb888) == [RGB888(72, 244, 248)]);

Meta