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.
Recompile libpng. I’ve had that issue before and it’s just a precompiled
binary issue.On 19 Jul 2014 09:41, “RunningOn” wrote:
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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)
2014-07-19 15:41 GMT+02:00 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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Where is libpng? in the source of SDL2_image?
MrOzBarry wrote:> Recompile libpng.?? I’ve had that issue before and it’s just a precompiled binary issue. On 19 Jul 2014 09:41, “RunningOn” <@RunningOn (@RunningOn)> wrote:
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
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
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.
2014-07-19 15:47 GMT+02:00 Alex Barry <alex.barry at gmail.com>:> Recompile libpng. I’ve had that issue before and it’s just a precompiled
binary issue.
On 19 Jul 2014 09:41, “RunningOn” wrote:
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
libpng doesn’t provide a way to have the warnings redirected somewhere
else? Forcing all that through the console is annoying.
2014-07-19 11:43 GMT-03:00, 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.
2014-07-19 15:47 GMT+02:00 Alex Barry <alex.barry at gmail.com>:
Recompile libpng. I’ve had that issue before and it’s just a precompiled
binary issue.
On 19 Jul 2014 09:41, “RunningOn” wrote:
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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.
2014-07-19 7:41 GMT-06:00 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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Javier Flores
-------------- next part --------------
#!/usr/bin/env python
-- coding: utf-8 --
fix.py
Copyright 2014 Javier
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
from PIL import Image
import glob, os
def main():
for infile in glob.glob(“*.png”):
im = Image.open(infile)
im.save(infile);
return 0
if name == ‘main’:
main()
Huh, recompiling worked for me about a year ago, but that’s interesting.
Thanks for the tip :)On Sat, Jul 19, 2014 at 10:43 AM, Jonas Kulla wrote:
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.
2014-07-19 15:47 GMT+02:00 Alex Barry <@Alex_Barry>:
Recompile libpng. I’ve had that issue before and it’s just a precompiled
binary issue.
On 19 Jul 2014 09:41, “RunningOn” wrote:
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
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org