[FIX] tools: fix support for multi-frame GIF images
[FIX] tools: fix support for multi-frame GIF images

Before this commit, only the first frame would be saved.

PR: #31208

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo