summaryrefslogtreecommitdiff
path: root/apps/examples/nximage/nximage_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/nximage/nximage_bitmap.c')
-rw-r--r--apps/examples/nximage/nximage_bitmap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/examples/nximage/nximage_bitmap.c b/apps/examples/nximage/nximage_bitmap.c
index 17bfd4c8e..f672ce3fe 100644
--- a/apps/examples/nximage/nximage_bitmap.c
+++ b/apps/examples/nximage/nximage_bitmap.c
@@ -144,11 +144,18 @@ static const nxgl_mxpixel_t g_lut[IMAGE_NLUTCODES] =
0x53fc /* Codes 140-140 */
};
-/* RGB8 (332) Colors */
+/* 8-bit color lookups. NOTE: This is really dumb! The lookup index is 8-bits and it used
+ * to lookup an 8-bit value. There is no savings in that! It would be better to just put
+ * the 8-bit color/greyscale value in the run-length encoded image and save the cost of these
+ * pointless lookups. But these p;ointless lookups do make the logic compatible with the
+ * 16- and 24-bit types.
+ */
#elif CONFIG_EXAMPLES_NXIMAGE_BPP == 8
# ifdef CONFIG_EXAMPLES_NXIMAGE_GREYSCALE
+/* 8-bit Greyscale */
+
static const uint8_t g_lut[IMAGE_NLUTCODES] =
{
0x00, 0x19, 0x8b, 0x46, 0x4a, 0x0b, 0x8d, 0x41, 0x44, 0x27, 0x32, 0x92, 0x59, 0x34, 0x6d, 0xdb, /* Codes 0-15 */
@@ -163,6 +170,8 @@ static const uint8_t g_lut[IMAGE_NLUTCODES] =
# else /* CONFIG_EXAMPLES_NXIMAGE_GREYSCALE */
+/* RGB8 (332) Colors */
+
static const nxgl_mxpixel_t g_lut[IMAGE_NLUTCODES] =
{
0x00, 0x25, 0x77, 0x4b, 0x01, 0x47, 0x26, 0x4a, 0x4f, 0x72, 0xdf, 0x93, 0xff, 0x27, 0xbb, 0xdb, /* Codes 0-15 */