When including .png converted with Photoshop CS6 to gray-scale I get a warning
"warning: pdflatex> libpng warning: iCCP: known incorrect sRGB profile
".
To be precise, I get 36 of these warnings. ;-)
What is the problem with these .png?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe newest libpng update (1.6.2 I believe?) has stricter rules about iCCP and will print this warning every time it finds a png that is broken. This warning can be ignored. Fixes would include:
In the end this is a problem that should be fixed by the maintainer of the code.
Script that would change all .png files in the current directory:
for f in $(find . -type f -name "*.png")
do
echo "Processing $f ..."
convert $f -strip $f
done
nag
package for filtering and shutting it up for various warnings.
convert $f $f
was enough, no need to use -strip
which might change your image colors.
To strip all .png files with ImageMagick, you can simply run the following command
find . -type f -name "*.png" -exec convert {} -strip {} \;
convert
is the name of an ImageMagick executable. If you want to convert all png images in this subdirectory: find src/main/res/drawable-hdpi -type f -name "*.png" -exec convert {} -strip {} \;
Apr 26, 2015 at 11:46
convert {} {}
was enough, no need to use -strip
which might change your image colors.
Saving the image with a lower bit depth will probably eliminate the problem altogether; since you have no real color variance and no alpha, 8-bit should look the same.
The reason is that with grayscale, you only really have 256 shades of gray with no RGB variance, and of course, no alpha.
I found a workaround that may help.
I downloaded the ImageOptim software: https://imageoptim.com/ (Free)
and went to the folder Xamarin/Android.Support.v7.AppCompat/21.0.3/embedded and drag the images into the imageoptim and it deleted the metadata.
And that fixed.
I am a Graphic Designer (not a coder so please excuss my ignorance) who was asked to save the image from Photoshop without sRGB profile to avoid this warning message by one of my colleagues. The simplest solution I found is to: 'Save for Web' from Photoshop giving you far more options when saving a PNG than simply 'Save As' - within the addtional options you can simply untick the box for embeding the PNG with sRGB profile. Hope this is of some help to someone, it worked for us.