Parcourir la source

read exif from images

Rémi Synave il y a 1 an
Parent
commit
3690c5e245
2 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 3 1
      WorkArea/WorkArea.cpp
  2. 1 0
      WorkArea/WorkArea.hpp

+ 3 - 1
WorkArea/WorkArea.cpp

@@ -83,7 +83,9 @@ WorkArea::~WorkArea ()
 void
 WorkArea::loadImage (const std::string & filename)
 {
-  original = new QImage (QString::fromStdString (filename));
+  QImageReader qImgReader(QString::fromStdString (filename));
+  qImgReader.setAutoTransform(true);
+  original = new QImage (qImgReader.read());
   img =
     new QImage (original->scaled (screenSizeX, screenSizeY - this->geometry ().y (),
 		Qt::KeepAspectRatio, Qt::FastTransformation));

+ 1 - 0
WorkArea/WorkArea.hpp

@@ -31,6 +31,7 @@
 #include <QMouseEvent>
 #include <QPoint>
 #include <QImage>
+#include <QImageReader>