summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp3
-rw-r--r--src/svg/qsvghandler.cpp6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp
index 0c26cb5..457c79e 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.cpp
+++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp
@@ -176,7 +176,8 @@ bool QSvgIOHandler::read(QImage *image)
t.translate(tr1.x(), tr1.y());
bounds = t.mapRect(bounds);
}
- *image = QImage(finalSize, QImage::Format_ARGB32_Premultiplied);
+ if (image->size() != finalSize || !image->reinterpretAsFormat(QImage::Format_ARGB32_Premultiplied))
+ *image = QImage(finalSize, QImage::Format_ARGB32_Premultiplied);
if (!finalSize.isEmpty()) {
image->fill(d->backColor.rgba());
QPainter p(image);
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 0971fdf..d49a4ab 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -1143,9 +1143,9 @@ static QMatrix parseTransformationMatrix(const QStringRef &value)
if(state == Matrix) {
if(points.count() != 6)
goto error;
- matrix = matrix * QMatrix(points[0], points[1],
- points[2], points[3],
- points[4], points[5]);
+ matrix = QMatrix(points[0], points[1],
+ points[2], points[3],
+ points[4], points[5]) * matrix;
} else if (state == Translate) {
if (points.count() == 1)
matrix.translate(points[0], 0);