summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp3
1 files changed, 2 insertions, 1 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);