summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-07-04 13:31:03 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-07-04 13:31:03 +0200
commit73f25d1a411ede3f78e8468999b4d362c51180d3 (patch)
tree654fa0c3840fc7d7ff92f853e1f2928eba56ffcb /src
parent51ab877ae95d79d47fa99c39b1be7c8a570b2339 (diff)
parent144a3535db9f95e60972d3c3b6eaceb65a604577 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: I55c144a1d0579aa19691c44c4f8ef8bf702189cb
Diffstat (limited to 'src')
-rw-r--r--src/imageformats/doc/src/qtimageformats.qdoc4
-rw-r--r--src/plugins/imageformats/webp/qwebphandler.cpp8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/imageformats/doc/src/qtimageformats.qdoc b/src/imageformats/doc/src/qtimageformats.qdoc
index 8852117..2fea934 100644
--- a/src/imageformats/doc/src/qtimageformats.qdoc
+++ b/src/imageformats/doc/src/qtimageformats.qdoc
@@ -65,6 +65,10 @@ libraries. If not found, it may fall back on using a bundled copy (in
provided for manual builds only, and not used as a fallback in case system
libraries are unavailable.
+\note For security reasons, the Direct Draw Surface (DDS) handler is not built
+by default since Qt 5.8. Users who still want this handler can build it from the
+source project.
+
\section2 Deployment
When built, the Qt Image Formats plugins are located as dynamic
diff --git a/src/plugins/imageformats/webp/qwebphandler.cpp b/src/plugins/imageformats/webp/qwebphandler.cpp
index 0bd89f6..ce90158 100644
--- a/src/plugins/imageformats/webp/qwebphandler.cpp
+++ b/src/plugins/imageformats/webp/qwebphandler.cpp
@@ -74,6 +74,10 @@ bool QWebpHandler::canRead() const
if (m_scanState != ScanError) {
setFormat(QByteArrayLiteral("webp"));
+
+ if (m_features.has_animation && m_iter.frame_num >= m_frameCount)
+ return false;
+
return true;
}
return false;
@@ -118,6 +122,8 @@ bool QWebpHandler::ensureScanned() const
that->m_bgColor = QColor::fromRgba(QRgb(WebPDemuxGetI(m_demuxer, WEBP_FF_BACKGROUND_COLOR)));
that->m_composited = new QImage(that->m_features.width, that->m_features.height, QImage::Format_ARGB32);
+ if (that->m_features.has_alpha)
+ that->m_composited->fill(Qt::transparent);
// We do not reset device position since we have read in all data
m_scanState = ScanSuccess;
@@ -189,6 +195,8 @@ bool QWebpHandler::read(QImage *image)
} else {
// Animation
QPainter painter(m_composited);
+ if (m_features.has_alpha && m_iter.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND)
+ m_composited->fill(Qt::transparent);
painter.drawImage(currentImageRect(), frame);
*image = *m_composited;