Send correct orientation for exif rotated images

This commit is contained in:
Nicolas Werner 2020-04-26 11:41:30 +02:00
parent dbb13dfad6
commit 17c657a170

View file

@ -325,8 +325,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
QSize dimensions; QSize dimensions;
QString blurhash; QString blurhash;
if (mimeClass == "image") { if (mimeClass == "image") {
QImage img; QImage img = utils::readImage(&bin);
img.loadFromData(bin);
dimensions = img.size(); dimensions = img.size();
if (img.height() > 200 && img.width() > 360) if (img.height() > 200 && img.width() > 360)
img = img.scaled(360, 200, Qt::KeepAspectRatioByExpanding); img = img.scaled(360, 200, Qt::KeepAspectRatioByExpanding);