1
0

fix: always detect format from content

This commit is contained in:
Gary Wang
2019-10-13 22:12:58 +08:00
parent f88af4b6c0
commit dc533e26c9
2 changed files with 5 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ void GraphicsView::showFromUrlList(const QList<QUrl> &urlList)
showGif(filePath);
} else {
QImageReader imageReader(filePath);
imageReader.setDecideFormatFromContent(true);
QImage::Format imageFormat = imageReader.imageFormat();
if (imageFormat == QImage::Format_Invalid) {
showText(tr("File is not a valid image"));