# ConvertImageToColor565 **Repository Path**: ChenZTai/ConvertImageToColor565 ## Basic Information - **Project Name**: ConvertImageToColor565 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-12-31 - **Last Updated**: 2024-12-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Convert Image to Color565 for TFT_eSPI Convert image(jpg/png/bmp) to color565 hex array,for TFT_eSPI ES32/Arduino/Etc # How to use It's very easy. ## 1. Visit https://bi3qwq.github.io/ConvertImageToColor565/. ## 2. load Image file and save to "img1.h" file. ![Alt text](screen.jpg) ## 3. compile Arduino code. ``` #include #include #include "img1.h" TFT_eSPI tft = TFT_eSPI(); //【use TFT_eSprite will be faster.】 // TFT_eSprite spr(&tft); void setup() { tft.init(); //【use Default】 tft.fillScreen(TFT_WHITE); tft.setSwapBytes(true); tft.pushImage(0, 0, img1_width, img1_height, img1); //display //【use TFT_eSprite will be faster.】 // spr.createSprite(100,100); // spr.fillSprite(TFT_WHITE); // spr.setSwapBytes(true); // spr.pushImage(0, 0, img1_width, img1_height, img1); // spr.pushSprite(0, 0); //display } void loop() { } ```