c2f57082
by Zhengyong Chen at 2026-06-17T23:04:42+02:00
windowscodecs: Decode GIF frames on demand.
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>