OSDN Git Service

use the QPixmap::scaled() method in QMoviePrivate::next()
authorIvailo Monev <xakepa10@gmail.com>
Tue, 15 Nov 2022 18:08:42 +0000 (20:08 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 15 Nov 2022 18:09:54 +0000 (20:09 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qmovie.cpp
src/gui/image/qpixmap.cpp

index 9dd1480..274aced 100644 (file)
@@ -445,7 +445,7 @@ bool QMoviePrivate::next()
     currentFrameNumber = nextFrameNumber++;
     QSize scaledSize = reader->scaledSize();
     if (scaledSize.isValid() && (scaledSize != info.pixmap.size()))
-        currentPixmap = QPixmap::fromImage( info.pixmap.toImage().scaled(scaledSize) );
+        currentPixmap = info.pixmap.scaled(scaledSize);
     else
         currentPixmap = info.pixmap;
     nextDelay = speedAdjustedDelay(info.delay);
index 43bfb06..1e8e16c 100644 (file)
@@ -1006,11 +1006,11 @@ QPixmap QPixmap::transformed(const QTransform &transform,
 }
 
 /*!
-  \overload
+    \overload
 
-  This convenience function loads the \a matrix into a
-  QTransform and calls the overloaded function.
- */
+    This convenience function loads the \a matrix into a
+    QTransform and calls the overloaded function.
+*/
 QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode) const
 {
     return transformed(QTransform(matrix), mode);