Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.8.1
-
None
-
Qt 4.8.1
OS MS Windows 7 enterprise
Description
When I try to scale QImage object from one size to another result changes format of QImage.
example code:
main.cpp
#include <QApplication> #include <qdebug.h> #include <qimage.h> int main(int argc, char* argv[]) { QApplication app(argc, argv); QImage img(10, 10, QImage::Format_ARGB32); qDebug()<<img.format(); img = img.scaled(20, 20, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); qDebug()<<img.format(); return app.exec(); }
Results are:
before scale: 5 = QImage::Format_ARGB32
after scale: 6 = QImage::QImage::Format_ARGB32_Premultiplied
This is wrong behaviour.