I have an image file on my desktop. I try to load it in Qt by QImage or QPixmap, but it has been rotated 90 degrees in the widget.
Source file dimension is 2448 x 3264.
QImage imdisplay(picPath);
QPixmap pp = QPixmap::fromImage(imdisplay);
ui->picpreview->setPixmap(pp.scaled(ui->picpreview->width(),ui->picpreview->height(),Qt::KeepAspectRatio));
qDebug() << imdisplay.size();
qDebug() << pp.width() << "x" << pp.height();
This is the qDebug log:
QSize(3264, 2448)
3264 x 2448
Where is the problem? image info