Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] libpng warning: iCCP: known incorrect sRGB profile drive me nuts
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] libpng warning: iCCP: known incorrect sRGB profile drive me nuts

Scheduled Pinned Locked Moved General and Desktop
21 Posts 6 Posters 165.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS SGaist

    Why ? You already have the compiler matching your Qt version, no need of more for testing the png plugin

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #7

    @SGaist
    Hi
    But my Qt Creator is compiled with VS so I assumed that compiling a new png plugin with minGW is a no go ? (as in wont work)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #8

      The Qt version used for Qt Creator and the one you use for your application doesn't need to match unless you are building a Qt Creator plugin but in the case of your tests to disable this warning, you don't need to build a Qt Creator plugin.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      mrjjM 1 Reply Last reply
      0
      • SGaistS SGaist

        The Qt version used for Qt Creator and the one you use for your application doesn't need to match unless you are building a Qt Creator plugin but in the case of your tests to disable this warning, you don't need to build a Qt Creator plugin.

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #9

        @SGaist
        Ahh, now I understand you. (i think)
        So you say I can create a new png plugin
        and then load that in my application ?
        I guess I have to put it in build folder/plugins for app to load the modified one?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #10

          IIRC, the plugin will be replaced directly in your Qt installation once built

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          mrjjM 1 Reply Last reply
          0
          • SGaistS SGaist

            IIRC, the plugin will be replaced directly in your Qt installation once built

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #11

            @SGaist
            As in
            D:\Qt\Tools\QtCreator\bin\plugins\imageformats
            hmm
            http://doc.qt.io/qt-5/qtimageformats-index.html

            dont list PNG.

            So its not a plugin but sort of build in ?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #12

              No, as in D:\Qt\5.5\MinGW\plugins\imageformats

              Don't mix the Qt you use with Qt Creator.

              PNG support is in qtbase (it's in the list on the second line of the first paragraph). But now that you mentioned it, you're right: it's builtin.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              mrjjM 1 Reply Last reply
              0
              • SGaistS SGaist

                No, as in D:\Qt\5.5\MinGW\plugins\imageformats

                Don't mix the Qt you use with Qt Creator.

                PNG support is in qtbase (it's in the list on the second line of the first paragraph). But now that you mentioned it, you're right: it's builtin.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #13

                @SGaist
                Ahh, of cause . Creator is Vs but mingw need its own version.
                Hmm I getting blind, as I see no mention of qtbase but now i know.
                Maybe I should try it on linux where all will be gcc. (I hope)

                Thank you for your time.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #14

                  The Qt Gui module is in qtbase.

                  But again, it has nothing to do with Qt Creator, to make your tests with pngs, you'll have to build qtbase (only qtbase, no need for the rest) so it will be a new Qt version + corresponding Kit for Qt Creator

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  mrjjM 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    The Qt Gui module is in qtbase.

                    But again, it has nothing to do with Qt Creator, to make your tests with pngs, you'll have to build qtbase (only qtbase, no need for the rest) so it will be a new Qt version + corresponding Kit for Qt Creator

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #15

                    @SGaist
                    Ah. That way.
                    Is there anywhere I can see which modules are part of what etc? like an overview.
                    So qtbase.pro files must the one Im looking for.

                    I assume getting the one from
                    git://gitorious.org/qt/qtbase.git.

                    could work.

                    Thank you for all the info.

                    mrjjM 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @SGaist
                      Ah. That way.
                      Is there anywhere I can see which modules are part of what etc? like an overview.
                      So qtbase.pro files must the one Im looking for.

                      I assume getting the one from
                      git://gitorious.org/qt/qtbase.git.

                      could work.

                      Thank you for all the info.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      well it seems libpng follow standard and
                      photoshop is not strict enough, so I just have to live with it or
                      strip the profile completely.

                      "
                      Error detection in some chunks has improved; in particular the iCCP chunk
                      reader now does pretty complete validation of the basic format. Some bad
                      profiles that were previously accepted are now rejected, in particular the
                      very old broken Microsoft/HP sRGB profile. The PNG spec requirement that
                      only grayscale profiles may appear in images with color type 0 or 4 and that
                      even if the image only contains gray pixels, only RGB profiles may appear
                      in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
                      is allowed to appear in images with any color type.
                      "

                      1 Reply Last reply
                      0
                      • mrjjM mrjj

                        When adding png exported from photoshop to Qrc
                        and using them in the program, I get
                        tons of
                        libpng warning: iCCP: known incorrect sRGB profile
                        libpng warning: iCCP: known incorrect sRGB profile
                        (one for each file..)
                        Which is pretty annoying.

                        No other tool I have that reads png have an issue with these files, only libpng.
                        Its photoshop 2015. Profile is correct for all tools I have that can use png profiles.

                        Can I somehow disable this warning ?
                        thanks

                        aghilproA Offline
                        aghilproA Offline
                        aghilpro
                        wrote on last edited by aghilpro
                        #17

                        @mrjj This Warning is about PNG formats and Qt, Irrelevant to @ztono code. Read more about PNG (Portable Network Graphics) https://en.wikipedia.org/wiki/Portable_Network_Graphics

                        PNG has many Formats some old, some not standard for Qt. see more History_and_development You need to use Standard format in Qt.

                        Answer To Your Problem: https://stackoverflow.com/questions/43374187/qt-open-a-jpg-file-with-warning-image-format-not-supported

                        "I know one thing; that I know nothing." - Socrates

                        mrjjM 1 Reply Last reply
                        0
                        • aghilproA aghilpro

                          @mrjj This Warning is about PNG formats and Qt, Irrelevant to @ztono code. Read more about PNG (Portable Network Graphics) https://en.wikipedia.org/wiki/Portable_Network_Graphics

                          PNG has many Formats some old, some not standard for Qt. see more History_and_development You need to use Standard format in Qt.

                          Answer To Your Problem: https://stackoverflow.com/questions/43374187/qt-open-a-jpg-file-with-warning-image-format-not-supported

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by mrjj
                          #18

                          @aghilpro
                          Actually it turn out it was the color profile that photoshop put in the png file and
                          libpng didn't like it. Seems to have vanish in later Qt versions.

                          1 Reply Last reply
                          3
                          • _ Offline
                            _ Offline
                            __d4ve__
                            wrote on last edited by
                            #19

                            Open with -> Photoshop -> File -> Save for web... -> Save..

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              seyed
                              wrote on last edited by
                              #20

                              As a quick solution, you can fix that image using some optimisation utilities.
                              On the MacOS, I successfully solved this problem using the ImageOptim.
                              On other platforms, there is some similar tools such as the Trimage for Linux and the pinga for Windows, but I didn't test these.

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                drwa
                                wrote on last edited by
                                #21

                                First of all, my image is displayed correctly, despite the warning.
                                I fixed the warning by opening in "Snip & Sketch" Windows application and then, saving it again.

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved