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

QImage::scaled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.0
    • 5.11.2
    • Image formats
    • None

    Description

      I am using QImageReader and QImage to load and scale extra large jpg file, which is 46240 * 45480.  When I scale the image into small images, it works well when the target size is smaller than 460 * 460. However, it will lose part image when the target size is over 480 * 480. Please refer to attached images as the result of scales.

       

      image_reader = QImageReader(file_path)
      image = image_reader.read()

      overview_image = image.scaled(480, 480, Qt.KeepAspectRatio, Qt.FastTransformation)
      overview_image.save(file_path + '_bk01.jpg')
      self.image_model.overview_pixmap_m = QPixmap.fromImage(overview_image)

       

      Attachments

        1. BK_460.jpg
          BK_460.jpg
          30 kB
        2. BK_480.jpg
          BK_480.jpg
          18 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            kai.xie Kai Xie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes