mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
fix(gif): fix rare issue when drawing the gif's background
This commit is contained in:
parent
ab727d3181
commit
b1e2c06658
@ -133,11 +133,11 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
|
||||
#elif LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
|
||||
gif->frame = &gif->canvas[2 * width * height];
|
||||
#endif
|
||||
if (gif->bgindex)
|
||||
if (gif->bgindex) {
|
||||
memset(gif->frame, gif->bgindex, gif->width * gif->height);
|
||||
}
|
||||
bgcolor = &gif->palette->colors[gif->bgindex*3];
|
||||
|
||||
if (bgcolor[0] || bgcolor[1] || bgcolor [2])
|
||||
for (i = 0; i < gif->width * gif->height; i++) {
|
||||
#if LV_COLOR_DEPTH == 32
|
||||
gif->canvas[i*4 + 0] = *(bgcolor + 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user