For the love of Engineering

Image To TFT

This program converts images into ASCII text that can be pasted as a program directly into the Arduino IDE.  If the optional function is also generated, this code can be called directly to send the image to a TFT screen that uses the TFT library.  It was designed to work with the Elegoo TFT screen.  Simply copy and paste the code that is generated.  The image data is tagged to go into Flash memory so as to save variable or SRAM space.

Then, in your Arduino program, make sure that the TFT is initialised and call:

void rlebmpdraw(int x, int y, const uint16_t *sram_address, bool inverted)

e.g.

rlebmpdraw(20,10,water_image, false);  //draw water image (not colour inverted) at 20, 10.