[SOLVED] libpng warning: iCCP: known incorrect sRGB profile drive me nuts
-
IIRC, the plugin will be replaced directly in your Qt installation once built
-
@SGaist
As in
D:\Qt\Tools\QtCreator\bin\plugins\imageformats
hmm
http://doc.qt.io/qt-5/qtimageformats-index.htmldont list PNG.
So its not a plugin but sort of build in ?
-
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.
-
@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.
-
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
-
@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.
-
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.
" -
@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
-
As a quick solution, you can fix that image using some optimisation utilities.
On the MacOS, I successfully solved this problem using theImageOptim
.
On other platforms, there is some similar tools such as theTrimage
for Linux and thepinga
for Windows, but I didn't test these.