Discussion:
How to disable libpng warning: known incorrect sRGB profile
RunningOn
2014-07-19 13:41:37 UTC
Permalink
My game loads PNG files, and it keeps printing 'libpng warning: iCCP: known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files are not maintained by me.

I just want to disable this warning. How to do it? Thanks.
Alex Barry
2014-07-19 13:47:50 UTC
Permalink
Recompile libpng. I've had that issue before and it's just a precompiled
binary issue.
Post by RunningOn
known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files
are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Jonas Kulla
2014-07-19 14:43:52 UTC
Permalink
It's not a precompiled binary issue; since version 1.6, libpng will emit
these
warnings when it encounters an invalid color profile, you most likey just
compiled an older version from source instead. This annoyance is not going
to go away unless the actual png's are sanitized.
Post by Alex Barry
Recompile libpng. I've had that issue before and it's just a precompiled
binary issue.
Post by RunningOn
known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files
are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Sik the hedgehog
2014-07-19 14:47:59 UTC
Permalink
libpng doesn't provide a way to have the warnings redirected somewhere
else? Forcing all that through the console is annoying.
Post by Jonas Kulla
It's not a precompiled binary issue; since version 1.6, libpng will emit
these
warnings when it encounters an invalid color profile, you most likey just
compiled an older version from source instead. This annoyance is not going
to go away unless the actual png's are sanitized.
Post by Alex Barry
Recompile libpng. I've had that issue before and it's just a precompiled
binary issue.
Post by RunningOn
known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files
are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Alex Barry
2014-07-19 18:53:04 UTC
Permalink
Huh, recompiling worked for me about a year ago, but that's interesting.
Thanks for the tip :)
Post by Jonas Kulla
It's not a precompiled binary issue; since version 1.6, libpng will emit
these
warnings when it encounters an invalid color profile, you most likey just
compiled an older version from source instead. This annoyance is not going
to go away unless the actual png's are sanitized.
Recompile libpng. I've had that issue before and it's just a precompiled
Post by Alex Barry
binary issue.
Post by RunningOn
known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG
files are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Jonas Kulla
2014-07-19 13:56:24 UTC
Permalink
If you're on Linux, install ImageMagick, then run

find . -iname "*.png" | while read f; do convert "${f}" -strip "${f}"; done

in the directory of your assets. This will fix the png's themselves.
(no warranties)
Post by RunningOn
known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files
are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
RunningOn
2014-07-19 14:40:32 UTC
Permalink
Where is libpng? in the source of SDL2_image?
Post by RunningOn
My game loads PNG files, and it keeps printing 'libpng warning: iCCP: known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
Javier Flores
2014-07-19 18:08:28 UTC
Permalink
as far as i know you need to downgrade to a past version of libpng, but my
advice would be to create a script that convert all the images to a correct
format. you can use Python with PIL to do the job, or ImageMagick if
available. Something like this.
Post by RunningOn
known incorrect sRGB profile', which is very annoying for debugging.
I know there must be something wrong with my PNG files. But the PNG files
are not maintained by me.
I just want to disable this warning. How to do it? Thanks.
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
--
*Javier Flores*
Loading...