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

QImage::scale doesn't work for Format_Grayscale16 images

    XMLWordPrintable

Details

    • Windows
    • ade24763c74ce506276218ec1ce0e307301717fe (qt/qtbase/dev) 978131ba7106df99e010f5ea5559204424f29ab7 (qt/qtbase/6.0) 625a0d57aff2c0f42c832eabcc123778e0374922 (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      If you try to scale a QImage::Format_Grayscale16 image the generated image is wrong. I attach a 16 bit image to test.

      QImage roi;
      roi.load("roiImg.png");
      auto scaledRoi = roi.scaled(roi.width()/2, roi.height()/2, Qt::KeepAspectRatio);
      scaledRoi.save("roiImgScaled.png");
      
      

      This bug also affects QPainter::drawImage().

      Attachments

        1. roiImg.png
          roiImg.png
          2.31 MB
        2. roiScaled.png
          roiScaled.png
          3 kB

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            gghelli Gianluca Ghelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: