From ef9b222c3527c81d3bdc85ce127a184108900485 Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Wed, 13 May 2020 20:18:20 +0200 Subject: [PATCH] vertically center images --- src/convertworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/convertworker.cpp b/src/convertworker.cpp index c814b2d..be11f88 100644 --- a/src/convertworker.cpp +++ b/src/convertworker.cpp @@ -120,7 +120,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem QImage outImage = QImage(Width, Height, inImage.format()); outImage.fill(Qt::white); QPainter painter(&outImage); - painter.drawImage(0,0, inImage); + painter.drawImage(0, (outImage.height()-inImage.height())/2, inImage); painter.end(); QTemporaryFile tmpImage;