diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-04-04 00:15:08 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-04-04 00:15:08 +0200 |
commit | 007ee38b042bb6d9e424428b031818ce51f3e242 (patch) | |
tree | 514bae99917e032d190a125c8f479342b61d0da5 /src/MxcImageProvider.cpp | |
parent | Fix qtlabs platform in windows packages (diff) | |
download | nheko-007ee38b042bb6d9e424428b031818ce51f3e242.tar.xz |
Fix exif rotation in unencrypted rooms
Diffstat (limited to 'src/MxcImageProvider.cpp')
-rw-r--r-- | src/MxcImageProvider.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/MxcImageProvider.cpp b/src/MxcImageProvider.cpp index a20657c8..ab6540a4 100644 --- a/src/MxcImageProvider.cpp +++ b/src/MxcImageProvider.cpp @@ -69,7 +69,7 @@ MxcImageProvider::download(const QString &id, QDir().mkpath(fileInfo.absolutePath()); if (fileInfo.exists()) { - QImage image(fileInfo.absoluteFilePath()); + QImage image = utils::readImageFromFile(fileInfo.absoluteFilePath()); if (!image.isNull()) { image = image.scaled( requestedSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); @@ -143,7 +143,8 @@ MxcImageProvider::download(const QString &id, return; } } else { - QImage image(fileInfo.absoluteFilePath()); + QImage image = + utils::readImageFromFile(fileInfo.absoluteFilePath()); if (!image.isNull()) { then(id, requestedSize, @@ -190,7 +191,8 @@ MxcImageProvider::download(const QString &id, return; } - QImage image(fileInfo.absoluteFilePath()); + QImage image = + utils::readImageFromFile(fileInfo.absoluteFilePath()); image.setText("original filename", QString::fromStdString(originalFilename)); image.setText("mxc url", "mxc://" + id); |