Commit Graph

14 Commits

Author SHA1 Message Date
Frank
c1979f8bc7 no fun in Germany ;-)
no fun, just rabbits. Lets stay professional.
2025-11-07 12:08:31 +01:00
Frank
c58c6ef268 minor robustness improvement
If seg.name is at least 32 characters long, strncpy will fill the 32-byte window without appending '\0'. This could lead to sporadic errors.
2025-11-07 11:58:55 +01:00
Frank
9115cd17af tiny cleanup, ready to merge 2025-11-07 11:45:46 +01:00
Frank
f955df0488 camelCase, future support, minor cleanup
* use camelCase for local variables
* furure support: rename drawPixelCallback to draw2DPixelCallback
2025-11-07 11:05:44 +01:00
Frank
9564791640 prevent string underflow
if seg.name is empty or shorter than four characters, ``strlen(lastFilename) - 4``  underflows (size_t), so the pointer passed to strcmp lands far before the buffer and triggers undefined behavior.
This patch catches too-short segment names and aborts decoding.
2025-11-07 00:28:40 +01:00
Frank
25391fe765 try to catch / handle Gif decoder OOM gracefully
... by adding an exception handler that will catch OOM inside decoder.alloc().
not tested yet.
2025-11-07 00:11:14 +01:00
Frank
698da84b4a prevent division by zero when image width or height is 0
catch error early before starting the decode/paint loop
2025-11-06 23:09:09 +01:00
Frank
10b3ac0eb1 gifdecoder speedup and bugfixes
* fixed a bug that caused wrong behavior with segment mirroring
    (effects must use virtualHeight() /  virtualWidth() instead of height() / width())
* added image blur as an option (second slider)
* added very basic error reporting for users
*  up to 25% faster, especially with big animated gifs

* made all local variables "static" (don't pollute global namespace)
* drawPixelCallback: cache calculation that do not depend on x/y position
* reduced memory allocations on boards without PSRAM, to avoid crashes
2025-11-06 22:50:59 +01:00
Will Tatam
d9ab878503 Swap to WLED_ENABLE_GIF 2025-02-22 12:56:47 +00:00
Christian Schwinne
6d67dc9828 Proper debug statements 2025-02-22 12:55:43 +00:00
Will Tatam
132244cb42 Fix build errors 2025-02-22 12:53:37 +00:00
Christian Schwinne
255be30b38 Working GIF support 2025-02-22 12:37:59 +00:00
Christian Schwinne
b8a29bcbf8 GIFs work again in principle 2025-02-22 12:37:13 +00:00
Christian Schwinne
e8c09104e1 GIF testing 2025-02-22 12:21:59 +00:00