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

Color changed of Pixmap on QLabel on Mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.12.10, 6.3.1
    • GUI: Painting
    • None
    • QT 5.12.10, Mac platform
    • macOS

    Description

      I use the setPixmap of QLabel to set a QPixmap in QLabel, which shows a picture.

      The pixmap is transformd from a QImage and the QImage is from a cv::Mat.

      On Mac platform, we find that the color of image on QLabel is more red than original image. 

      I save the cv::Mat, QImage and QPixmap in the middle, but all of them is exactly the same with the origin.

      I suspect this may be caused by pixmap scaled at first, but I try several scaled method but they did not help. I also remove the pixmap scale and resize the image in cv::Mat and it did not help.

      The image in QLabel is more red, expecially on human face,  like cover a red filter on face on Mac. However, this never happend on Windows. So I am confused.

      Our software is for designers, and they are sensitive with color. So I hope to get a solution as soon as possible.

      I have attached several diff image, our code, and test app project below.

      The images named with "our_app_diff_x.png" are the difference in our app, the images named with "test_app_diff_x.png" are the difference in the test app.

      The test app is in the file QLabel_Color_changed.zip, I put these three test image in it.

      Moreover, this bug happened in Qt 6.3.1 and 5.12.10.

       

      Attachments

        1. code.cpp
          1 kB
        2. our_app_diff_1.png
          our_app_diff_1.png
          1.13 MB
        3. our_app_diff_2.png
          our_app_diff_2.png
          2.84 MB
        4. our_app_diff_3.png
          our_app_diff_3.png
          2.95 MB
        5. QLabel_Color_changed.zip
          1.67 MB
        6. test_app_diff_1.png
          test_app_diff_1.png
          1.67 MB
        7. test_app_diff_2.png
          test_app_diff_2.png
          6.07 MB
        8. test_app_diff_3.png
          test_app_diff_3.png
          5.40 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            panzicheng zicheng pan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes