libpng warning: iCCP: known incorrect sRGB profile
Libpng-1.6 is more stringent about checking ICC profiles than previous versions. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image.
Some applications treat warnings as errors; if you are using such an application you do have to remove the chunk. You can do that with any of a variety of PNG editors such as ImageMagick's
convert in.png out.png
To remove the invalid iCCP chunk from all of the PNG files in a folder (directory), you can use mogrify
from ImageMagick:
mogrify *.png
This requires that your ImageMagick was built with libpng16. You can easily check it by running:
convert -list format | grep PNG
If you'd like to find out which files need to be fixed instead of blindly processing all of them, you can run
pngcrush -n -q *.png
where the -n
means don't rewrite the files and -q
means suppress most of the output except for warnings. Sorry, there's no option yet in pngcrush to suppress everything but the warnings.
Binary Releases of ImageMagick are here
For Android Projects (Android Studio) navigate into res
folder.
For example:
C:\{your_project_folder}\app\src\main\res\drawable-hdpi\mogrify *.png
libpng warning: iCCP: known incorrect sRGB profile when using tkinter.filedialog
Unbelievable, I uninstalled the Input Method Editor to solve the problem
How do I duplicate a whole line in Emacs?
I use
C-a C-SPACE C-n M-w C-y
which breaks down to
C-a
: move cursor to start of lineC-SPACE
: begin a selection ("set mark")C-n
: move cursor to next lineM-w
: copy regionC-y
: paste ("yank")
The aforementioned
C-a C-k C-k C-y C-y
amounts to the same thing (TMTOWTDI)
C-a
: move cursor to start of lineC-k
: cut ("kill") the lineC-k
: cut the newlineC-y
: paste ("yank") (we're back at square one)C-y
: paste again (now we've got two copies of the line)
These are both embarrassingly verbose compared to C-d
in your editor, but in Emacs there's always a customization. C-d
is bound to delete-char
by default, so how about C-c C-d
? Just add the following to your .emacs
:
(global-set-key "\C-c\C-d" "\C-a\C- \C-n\M-w\C-y")
(@Nathan's elisp version is probably preferable, because it won't break if any of the key bindings are changed.)
Beware: some Emacs modes may reclaim C-c C-d
to do something else.
Android Studio Error: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
I used pngcrush command line tool as follows to remomve iCCP chunks within PNGs
pngcrush.exe -rem iccp input.png output.png
Related Topics
Using Opencv and Svm With Images
Is C++ Context-Free or Context-Sensitive
Explicit Specialization in Non-Namespace Scope
Why Is Std::Map Implemented as a Red-Black Tree
Why Does Optimisation Kill This Function
How to Parse Space-Separated Floats in C++ Quickly
Is There Any Overhead to Declaring a Variable Within a Loop - C++
Is There a Replacement For Unistd.H For Windows (Visual C)
Why Are Unnamed Namespaces Used and What Are Their Benefits
C++ Dynamic Shared Library on Linux
Is This Behavior of Vector::Resize(Size_Type N) Under C++11 and Boost.Container Correct
How to Take a Screenshot in a Windows Application
When Are C++ Macros Beneficial