apply auto transform

This commit is contained in:
Gary Wang 2019-10-13 23:29:41 +08:00
parent dea8bfafe2
commit f2d83e3f85

View File

@ -42,6 +42,7 @@ void GraphicsView::showFromUrlList(const QList<QUrl> &urlList)
showGif(filePath); showGif(filePath);
} else { } else {
QImageReader imageReader(filePath); QImageReader imageReader(filePath);
imageReader.setAutoTransform(true);
imageReader.setDecideFormatFromContent(true); imageReader.setDecideFormatFromContent(true);
QImage::Format imageFormat = imageReader.imageFormat(); QImage::Format imageFormat = imageReader.imageFormat();
if (imageFormat == QImage::Format_Invalid) { if (imageFormat == QImage::Format_Invalid) {