kimgio: set the webp animation delay from the iterator

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-10 05:02:07 +03:00
parent d21869a910
commit c8056b579b

View file

@ -33,7 +33,7 @@ WebPHandler::WebPHandler()
: m_quality(100),
m_loopcount(0),
m_imagecount(1),
m_imagedelay(80),
m_imagedelay(100),
m_currentimage(0)
{
}
@ -91,6 +91,9 @@ bool WebPHandler::read(QImage *image)
return false;
}
// bound to reasonable limits
m_imagedelay = qBound(10, webpiter.duration, 10000);
*image = QImage(webpiter.width, webpiter.height, QImage::Format_ARGB32);
if (Q_UNLIKELY(image->isNull())) {
kWarning() << "Could not create image";