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

PNG can't save with QColorProfile of sRGB

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • 5.14.2
    • 5.14.1
    • Image formats
    • None
    • Windows

    Description

      The following code fails:

      QImage image("phake cave trip1.jpg");
      bool couldSave = image.save("test.png"); //couldSave returns false
      Q_ASSERT(couldSave); //This fails
      
      image.setColorSpace(QColorSpace()); //Clearing the color space is a workaround
      couldSave = image.save("test.png"); //This works
      Q_ASSERT(couldSave);
      

       

      Image is "phake cave trip1.jpg" is attached.

      This also outputs:

      libpng error: known incorrect sRGB profile

      on the commandline. 

       

      Attachments

        Issue Links

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              vpicaver Philip Schuchardt
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: