From e6bb22449f976bd72e44284a9322c43dfe0a1452 Mon Sep 17 00:00:00 2001 From: "prof.paradox" <97211571+saturnhades@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:16:31 +0530 Subject: [PATCH] Update LittleFS_PNG.ino The Code wasn't compiling as the pngDraw function was of void return type change that to int for successful image rendering --- examples/PNG Images/LittleFS_PNG/LittleFS_PNG.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/PNG Images/LittleFS_PNG/LittleFS_PNG.ino b/examples/PNG Images/LittleFS_PNG/LittleFS_PNG.ino index 18040b8a..d261d504 100644 --- a/examples/PNG Images/LittleFS_PNG/LittleFS_PNG.ino +++ b/examples/PNG Images/LittleFS_PNG/LittleFS_PNG.ino @@ -96,8 +96,9 @@ void loop() // render each image line to the TFT. If you use a different TFT library // you will need to adapt this function to suit. // Callback function to draw pixels to the display -void pngDraw(PNGDRAW *pDraw) { +int pngDraw(PNGDRAW *pDraw) { uint16_t lineBuffer[MAX_IMAGE_WIDTH]; png.getLineAsRGB565(pDraw, lineBuffer, PNG_RGB565_BIG_ENDIAN, 0xffffffff); tft.pushImage(xpos, ypos + pDraw->y, pDraw->iWidth, 1, lineBuffer); + return 1; }