fix: always detect format from content
This commit is contained in:
parent
f88af4b6c0
commit
dc533e26c9
|
@ -7,3 +7,7 @@
|
|||
- For windows build, win32 APIs are used.
|
||||
- No license file provided.
|
||||
- No drag-window-border-to-resize support under non-windows platforms (I use <kbd>Meta+Drag</kbd> to resize window under my x11 desktop).
|
||||
|
||||
## License
|
||||
|
||||
This program released under MIT license
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user