From 6d980f77a2bee09ae54dae6ca55e98d5eeca7931 Mon Sep 17 00:00:00 2001 From: Yonghye Kwon Date: Sun, 6 Jun 2021 14:53:11 +0900 Subject: [PATCH] fix #49 rotating --- label_img.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/label_img.cpp b/label_img.cpp index 124e5ef..f0dc3e7 100644 --- a/label_img.cpp +++ b/label_img.cpp @@ -1,5 +1,6 @@ #include "label_img.h" #include +#include #include /* fabs */ using std::ifstream; @@ -105,7 +106,9 @@ void label_img::setMousePosition(int x, int y) void label_img::openImage(const QString &qstrImg, bool &ret) { - QImage img(qstrImg); + QImageReader imgReader(qstrImg); + imgReader.setAutoTransform(true); + QImage img = imgReader.read(); if(img.isNull()) {