From 748427061cd92811d0927cc267d62a390349d3b3 Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Wed, 23 Oct 2019 16:18:24 +0100 Subject: [PATCH] ImageMagick makes diff format header --- examples/showBMP_kbv_Uno/showBMP_kbv_Uno.ino | 4 +++- examples/showBMP_not_Uno/showBMP_not_Uno.ino | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/showBMP_kbv_Uno/showBMP_kbv_Uno.ino b/examples/showBMP_kbv_Uno/showBMP_kbv_Uno.ino index d905a17..0aec12e 100644 --- a/examples/showBMP_kbv_Uno/showBMP_kbv_Uno.ino +++ b/examples/showBMP_kbv_Uno/showBMP_kbv_Uno.ino @@ -170,7 +170,9 @@ uint8_t showBMP(char *nm, int x, int y) h = tft.height() - y; if (bmpDepth <= PALETTEDEPTH) { // these modes have separate palette - bmpFile.seek(BMPIMAGEOFFSET); //palette is always @ 54 + //bmpFile.seek(BMPIMAGEOFFSET); //palette is always @ 54 + bmpFile.seek(50); //colorsimportant + bmpFile.seek(read32() ? 122 : 54); //important or regular palette bitmask = 0xFF; if (bmpDepth < 8) bitmask >>= bmpDepth; diff --git a/examples/showBMP_not_Uno/showBMP_not_Uno.ino b/examples/showBMP_not_Uno/showBMP_not_Uno.ino index 7d7890d..c1639b4 100644 --- a/examples/showBMP_not_Uno/showBMP_not_Uno.ino +++ b/examples/showBMP_not_Uno/showBMP_not_Uno.ino @@ -173,7 +173,9 @@ uint8_t showBMP(char *nm, int x, int y) h = tft.height() - y; if (bmpDepth <= PALETTEDEPTH) { // these modes have separate palette - bmpFile.seek(BMPIMAGEOFFSET); //palette is always @ 54 + //bmpFile.seek(BMPIMAGEOFFSET); //palette is always @ 54 + bmpFile.seek(50); //colorsimportant + bmpFile.seek(read32() ? 122 : 54); //important or regular palette bitmask = 0xFF; if (bmpDepth < 8) bitmask >>= bmpDepth;