From 29d2f7fc1bf8333398041238f2812ea232b3c5a9 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sun, 9 Nov 2025 19:06:59 +0100 Subject: [PATCH] debug print for decodeFrame error codes --- wled00/image_loader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wled00/image_loader.cpp b/wled00/image_loader.cpp index 9c168cdc..7c782c59 100644 --- a/wled00/image_loader.cpp +++ b/wled00/image_loader.cpp @@ -160,7 +160,7 @@ byte renderImageToSegment(Segment &seg) { DEBUG_PRINTLN(F("Starting decoding")); int decoderError = decoder.startDecoding(); if(decoderError < 0) { - DEBUG_PRINTF_P(PSTR("GIF Decoding error %d\n"), decoderError); + DEBUG_PRINTF_P(PSTR("GIF Decoding error %d in startDecoding().\n"), decoderError); errorFlag = ERR_NORAM_PX; gifDecodeFailed = true; return IMAGE_ERROR_GIF_DECODE; @@ -203,7 +203,11 @@ byte renderImageToSegment(Segment &seg) { if (millis() - lastFrameDisplayTime < wait) return IMAGE_ERROR_WAITING; int result = decoder.decodeFrame(false); - if (result < 0) { gifDecodeFailed = true; return IMAGE_ERROR_FRAME_DECODE; } + if (result < 0) { + DEBUG_PRINTF_P(PSTR("GIF Decoding error %d in decodeFrame().\n"), result); + gifDecodeFailed = true; + return IMAGE_ERROR_FRAME_DECODE; + } currentFrameDelay = decoder.getFrameDelay_ms(); unsigned long tooSlowBy = (millis() - lastFrameDisplayTime) - wait; // if last frame was longer than intended, compensate