Conversion from RGB888 to RGB565 262K/64k?

I have a tft 320x240 16bit/18bit ILI9341 and get very strange results when converting full rgb images to 16bit. I basically get garbage colors. It is probably during initialisation of tft but I am not sure where the color format is selected. Besides image conversion to bgr565 is totally scrambled

Maybe someone could advise something how to properly select color space and format for that tft
I need register cmd/data code calls

Which library are you using?

What format image are you decoding?

GFX style libraries have a method called color565()


I figured it out - TFT wants 16bit words swapped eg instead of msb-lsb it wants lsb-msb
I haven't gotten to 18 bit yet but for now all looks good

Here is a great result :wink: