im using the tft.drawXBitmap function to draw an image to screen.
what i have working is 8x8 pixel images, but if i step up to 16 x 16 bit images it draws the second half of the image first, its really weird. it only does this on the esp 32 and not on the arduino mega (same exact code)
i don't want to draw images and then convert them to hex. i wanna do it in binary. its easier and more fun for me this way and the end product is only 2 colors anyway (white pixels on black background)
this works and draws a 8 pixel x 8 pixel image fine on the screen at the location i want.
tft.drawXBitmap(65, 65, Chest8b, 8, 8, TFT_WHITE);
this works fine on the arduino mega but not on the esp32, instead it draws the second half of the image first but does not flip flop the top or bottom half.
tft.drawXBitmap(50, 50, Potion16b, 16, 16, TFT_WHITE);
this is the data used to draw the image,
//8x8 pixel image
static const unsigned char PROGMEM Chest8b[] = //Rounded chest
{0b00111100,
0b01000010,
0b10000001,
0b10111001,
0b11101111,
0b10010001,
0b10000001,
0b11111111 };
//16x16 pixel image
static const unsigned char PROGMEM Potion16b[] =
{ 0b00000011, 0b11000000,
0b00000100, 0b00100000,
0b00001000, 0b00010000,
0b00010100, 0b00101000,
0b00010011, 0b11001000,
0b00011000, 0b00010000,
0b00010111, 0b11001000,
0b00101000, 0b00100100,
0b00100000, 0b00000100,
0b00100000, 0b00010100,
0b00100000, 0b00010100,
0b00100000, 0b00010100,
0b00100000, 0b00000100,
0b00010000, 0b00001000,
0b00001100, 0b00110000,
0b00000011, 0b11000000 };
in the 16x16 version there are 4 blocks of 8x8 a top left, top right bottom left and bottom right and all 4 make a 16x16 pixel black and white image.
the issue im having is it draws both colums on the right hand side first and then both left hand colums second splitting the image. its weird as hell i don't get why its doing this.
i have come to the conclusion i need to port over to the esp32 from the mega because text takes allot of space... i only have to draw a handful of images for the story that's being written. i suppose i could draw all of them second half first but that's just as annoying as converting everything to hex....
ideally id like to draw custom images 24 x 24 pixels in size, how can i do this in binary and not have to convert to hex...