Respect exif rotation of images
Sometimes thumbnails still have the wrong dimensions, as they are scaled to fit inside a rectange of the reported size in the image. Not sure, who is wrong there, the media repo or we.
This commit is contained in:
parent
d94ac86816
commit
28adc9dc9b
4 changed files with 38 additions and 13 deletions
|
|
@ -1,9 +1,11 @@
|
|||
#include "Utils.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBuffer>
|
||||
#include <QComboBox>
|
||||
#include <QDesktopWidget>
|
||||
#include <QGuiApplication>
|
||||
#include <QImageReader>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QScreen>
|
||||
#include <QSettings>
|
||||
|
|
@ -657,3 +659,12 @@ utils::restoreCombobox(QComboBox *combo, const QString &value)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
QImage
|
||||
utils::readImage(QByteArray *data)
|
||||
{
|
||||
QBuffer buf(data);
|
||||
QImageReader reader(&buf);
|
||||
reader.setAutoTransform(true);
|
||||
return reader.read();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue