跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  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

已排程 已置頂 已鎖定 已移動 General and Desktop
21 貼文 6 Posters 162.0k 瀏覽 2 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • SGaistS SGaist

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

    mrjjM 離線
    mrjjM 離線
    mrjj
    Lifetime Qt Champion
    寫於 最後由 編輯
    #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 條回覆 最後回覆
    0
    • SGaistS 離線
      SGaistS 離線
      SGaist
      Lifetime Qt Champion
      寫於 最後由 編輯
      #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 條回覆 最後回覆
      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 離線
        mrjjM 離線
        mrjj
        Lifetime Qt Champion
        寫於 最後由 編輯
        #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 條回覆 最後回覆
        0
        • SGaistS 離線
          SGaistS 離線
          SGaist
          Lifetime Qt Champion
          寫於 最後由 編輯
          #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 條回覆 最後回覆
          0
          • SGaistS SGaist

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

            mrjjM 離線
            mrjjM 離線
            mrjj
            Lifetime Qt Champion
            寫於 最後由 編輯
            #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 條回覆 最後回覆
            0
            • SGaistS 離線
              SGaistS 離線
              SGaist
              Lifetime Qt Champion
              寫於 最後由 編輯
              #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 條回覆 最後回覆
              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 離線
                mrjjM 離線
                mrjj
                Lifetime Qt Champion
                寫於 最後由 編輯
                #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 條回覆 最後回覆
                0
                • SGaistS 離線
                  SGaistS 離線
                  SGaist
                  Lifetime Qt Champion
                  寫於 最後由 編輯
                  #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 條回覆 最後回覆
                  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 離線
                    mrjjM 離線
                    mrjj
                    Lifetime Qt Champion
                    寫於 最後由 編輯
                    #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 條回覆 最後回覆
                    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 離線
                      mrjjM 離線
                      mrjj
                      Lifetime Qt Champion
                      寫於 最後由 編輯
                      #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 條回覆 最後回覆
                      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 離線
                        aghilproA 離線
                        aghilpro
                        寫於 最後由 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 條回覆 最後回覆
                        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 離線
                          mrjjM 離線
                          mrjj
                          Lifetime Qt Champion
                          寫於 最後由 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 條回覆 最後回覆
                          3
                          • _ 離線
                            _ 離線
                            __d4ve__
                            寫於 最後由 編輯
                            #19

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

                            1 條回覆 最後回覆
                            0
                            • S 離線
                              S 離線
                              seyed
                              寫於 最後由 編輯
                              #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 條回覆 最後回覆
                              0
                              • D 離線
                                D 離線
                                drwa
                                寫於 最後由 編輯
                                #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 條回覆 最後回覆
                                0

                                • 登入

                                • Login or register to search.
                                • 第一個貼文
                                  最後的貼文
                                0
                                • 版面
                                • 最新
                                • 標籤
                                • 熱門
                                • 使用者
                                • 群組
                                • 搜尋
                                • Get Qt Extensions
                                • Unsolved