From 5d280f998cfa138cb29219d987eb6cff75cafce2 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Sat, 2 Nov 2019 14:18:33 +0000 Subject: [PATCH] Fix #346 --- examples/Generic/TFT_SPIFFS_BMP/BMP_functions.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/Generic/TFT_SPIFFS_BMP/BMP_functions.ino b/examples/Generic/TFT_SPIFFS_BMP/BMP_functions.ino index 515f13a..868cc8a 100644 --- a/examples/Generic/TFT_SPIFFS_BMP/BMP_functions.ino +++ b/examples/Generic/TFT_SPIFFS_BMP/BMP_functions.ino @@ -34,6 +34,7 @@ void drawBmp(const char *filename, int16_t x, int16_t y) { { y += h - 1; + bool oldSwapBytes = tft.getSwapBytes(); tft.setSwapBytes(true); bmpFS.seek(seekOffset); @@ -58,6 +59,7 @@ void drawBmp(const char *filename, int16_t x, int16_t y) { // y is decremented as the BMP image is drawn bottom up tft.pushImage(x, y--, w, 1, (uint16_t*)lineBuffer); } + tft.setSwapBytes(oldSwapBytes); Serial.print("Loaded in "); Serial.print(millis() - startTime); Serial.println(" ms"); }