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

PNG can't save with QColorProfile of sRGB

XMLWordPrintable

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

      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. 

       

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes