tft.pushImage displays wrong colors

I’m trying to get a BMP to display on WIO using pushImage(). The image is a solid 8x8 red square. It does not display as red, but seems to be blue or another color if you call swapBytes (). Image was designed using Microsoft paint and converted to an Arduino array using Image2CPP. Platform is VSCode using PlatformIO plugin. Here is the code:

#include <Arduino.h>

#include “TFT_eSPI.h” // WIO display stuff

// ‘red’, 8x8px

const uint16_t myredred [] = {

0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe208, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108,

0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108,

0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108,

0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108, 0xe108

};

// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 80)

const int myredallArray_LEN = 1;

const uint16_t* myredallArray[1] = {

myredred

};

TFT_eSPI tft; // WIO display

void setup() {

tft.begin();

tft.setRotation(3);

tft.fillScreen(TFT_BLACK);

tft.setSwapBytes(true);

tft.pushImage (8, 8, 8, 8, myredred);

}

void loop() { }

Here is the Image2CPP I used

I must say that I’m very disappointed in Seeed’s willingness to help their [current] users out. I’ve done most of the legwork already here and just want answers. Instead: crickets. My pointing out that I2S connections were mislabeled took a month to get an “oh yeah, you’re right”. I suspect that noone has tried this on WIO and something is wired wrong or possibly a library error. I’ve bought over $1k worth of S.S. stuff thinking it was pretty great and now I’m becoming jaded. If you want to see real international support go to Nordic semi’s DEVZONE site. You get a ticket number, it gets assigned and you get answers. I use “current” above because I’m about to mentally depreciate the S.S. stuff I’ve bought and throw it under the bus. I can pay more and not feel so - used. Looks like the M5 stack is similar, might try that. Nordic & Adafruit also support their products. Even if this rant gets some results this time I’ll still be suspicious of Seeed unless I see some customer commitment.

I am very sorry for your long wait.
Do you use Wio terminal to complete your project?
We are very sorry for our negligence again. If you want a more timely and effective reply, you can directly send the question to the technical support email. [email protected]

If you want to display 8x8 red square, we strongly suggest you can is to use another way to achieve it. You can refer to this Wiki to achieve the correct display of the image color.

My application does not include an SD card. This will not work for me.

In the code, you have tft.setSwapBytes(true); which swaps the byte order of the color values. Try removing this line and see if the colors display correctly without swapping the bytes.
Regards

That was the most obvious thing to try but it didn’t help.

I’m really hoping that someone tries my pared-down code and figures this out, otherwise that whole effort was a waste of time.