June 15, 2026
8:21 p.m.
The GIF decoder currently calls DGifSlurp() during initialization, which decodes and stores pixel data for every frame in the image. For animated GIFs with a large number of frames this can result in significant startup time and memory consumption, even when only a single frame is requested by the application. Change the decoder to scan GIF headers during initialization and defer frame pixel decoding until CopyPixels() is called for a specific frame. This avoids eagerly decoding unused frames while preserving existing decoder behavior. Signed-off-by: chenzhengyong chenzhengyong@uniontech.com tested on deepin v25 & UOS V20. -- v3: windowscodecs: Decode GIF frames on demand. https://gitlab.winehq.org/wine/wine/-/merge_requests/11149