Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-25482

QImage::scaled bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 6.0.0
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            wiz29 Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes