mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kimgio: set the webp animation delay from the iterator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d21869a910
commit
c8056b579b
1 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,7 @@ WebPHandler::WebPHandler()
|
||||||
: m_quality(100),
|
: m_quality(100),
|
||||||
m_loopcount(0),
|
m_loopcount(0),
|
||||||
m_imagecount(1),
|
m_imagecount(1),
|
||||||
m_imagedelay(80),
|
m_imagedelay(100),
|
||||||
m_currentimage(0)
|
m_currentimage(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,9 @@ bool WebPHandler::read(QImage *image)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bound to reasonable limits
|
||||||
|
m_imagedelay = qBound(10, webpiter.duration, 10000);
|
||||||
|
|
||||||
*image = QImage(webpiter.width, webpiter.height, QImage::Format_ARGB32);
|
*image = QImage(webpiter.width, webpiter.height, QImage::Format_ARGB32);
|
||||||
if (Q_UNLIKELY(image->isNull())) {
|
if (Q_UNLIKELY(image->isNull())) {
|
||||||
kWarning() << "Could not create image";
|
kWarning() << "Could not create image";
|
||||||
|
|
Loading…
Add table
Reference in a new issue