We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent b5ca788 commit f7f34efCopy full SHA for f7f34ef
src/gui/qgsexternalresourcewidget.cpp
@@ -22,6 +22,7 @@
22
#include <QGridLayout>
23
#include <QVariant>
24
#include <QSettings>
25
+#include <QImageReader>
26
#ifdef WITH_QTWEBKIT
27
#include <QWebView>
28
#endif
@@ -235,7 +236,10 @@ void QgsExternalResourceWidget::loadDocument( const QString &path )
235
236
237
if ( mDocumentViewerContent == Image )
238
{
- QPixmap pm( resolvedPath );
239
+ // use an image reader to ensure image orientation and transforms are correctly handled
240
+ QImageReader ir( resolvedPath );
241
+ ir.setAutoTransform( true );
242
+ QPixmap pm = QPixmap::fromImage( ir.read() );
243
mPixmapLabel->setPixmap( pm );
244
updateDocumentViewer();
245
}
0 commit comments