Getting the RGB888 value of pixel with JD_FORMAT = 0
How do I get the value of each 8 bit color when the library is configured with JD_FORMAT=0?
The function that draws the image, in the mai case called 'tft_outpu' ony has a pointer of 16bits. (int16_t _x, int16_t _y, uint16_t w, uint16_t h, uint16_t *bitmap).
I figure it out:
change JD_FORMAT to 0 in tjpgdcnf.h
in TJpg_Decoder.h change : "typedef bool (*SketchCallback)(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t *data);" to "typedef bool (*SketchCallback)(int16_t x, int16_t y, uint16_t w, uint16_t h, uint8_t *data);"
in TJpg_Decoder.cpp, line 155, change: return thisPtr->tft_output(x, y, w, h, (uint16_t*)bitmap); to return thisPtr->tft_output(x, y, w, h, (uint8_t*)bitmap);
it could be a ifdef for those two parts of the code based on the JD_FORMAT