mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kimgio: fill the webp buffer with transparent color
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f07799521f
commit
cbbf7a75e5
1 changed files with 3 additions and 1 deletions
|
@ -83,11 +83,13 @@ bool WebPHandler::read(QImage *image)
|
|||
m_loopcount = webpaniminfo.loop_count;
|
||||
m_imagecount = webpaniminfo.frame_count;
|
||||
|
||||
QImage buffer(webpaniminfo.canvas_width, webpaniminfo.canvas_height, QImage::Format_ARGB32);
|
||||
QImage buffer(webpaniminfo.canvas_width, webpaniminfo.canvas_height, QImage::Format_ARGB32_Premultiplied);
|
||||
if (Q_UNLIKELY(buffer.isNull())) {
|
||||
kWarning() << "Could not create buffer image";
|
||||
return false;
|
||||
}
|
||||
// NOTE: have to fill, areas of frames may not be drawn
|
||||
buffer.fill(Qt::transparent);
|
||||
|
||||
QRectF previousrect;
|
||||
QPainter painter(&buffer);
|
||||
|
|
Loading…
Add table
Reference in a new issue