Everytime I play minetest I'm getting this warning "PNG warning: iCCP: known incorrect sRGB profile"
Does anybody know more about it?
Paste: http://pastebin.com/4z0jYmqA
PNG warning: iCCP: known incorrect sRGB profile
-
- Member
- Posts: 122
- Joined: Wed Apr 10, 2013 16:46
-
- Member
- Posts: 122
- Joined: Wed Apr 10, 2013 16:46
Re: PNG warning: iCCP: known incorrect sRGB profile
Huh, been a while.
From here I saw the advice:
From here I saw the advice:
That will of course change the hash of every .png file it's used on, so you'll probably want a new git commit for each mod. I think "-n" instead of "-ow" will just print the messages instead, so you could parse that output somehow to find which files to change. Any .png files changed would probably have to be pushed to the upstream repository, before the rest of us could benefit from not flooding our console log with hundreds and hundreds of libpng warnings that don't even say which .png file is causing it.Code: Select all
pngcrush -ow -rem allb -reduce file.png
- ow will overwrite the input file
- rem allb will remove all ancillary chunks except tRNS and gAMA
- reduce does lossless color-type or bit-depth reduction
Re: PNG warning: iCCP: known incorrect sRGB profile
This fixed it:
Code: Select all
#include <stdio.h>
#include <stdlib.h> // free
/*
$ find -name '*.png' | while read filename; do pngcrush -q -n -rem allb -reduce $filename |& grep -v ^CPU | grep -v 'Total length' | tee badpngs.log
$ ./thisprogram < badpngs.log | while read filename; do pngcrush -ow -rem allb -reduce $filename; done
*/
//#define DEBUGGINGCRAP
int main(void)
{
char* line = NULL;
size_t space = 0;
char* filename = NULL;
size_t fnlen = 0;
for(;;) {
ssize_t amt = getline(&line, &space, stdin);
if(amt <= 0) break;
if(line[amt-1] == '\n') {
--amt;
if(amt == 0) continue;
}
if(line[0] == ' ' && line[1] == ' ') {
if(filename) free(filename - 2);
filename = line + 2; /* 2 leading spaces */
fnlen = amt - 3; /* trailing colon, space, newline? */
line = NULL;
space = 0;
continue;
}
if(filename == NULL) {
printf("BAD LOG %s", line);
continue;
}
#ifdef DEBUGGINGCRAP
printf("filename: %.*s\nerror: %.*s\n", (int)fnlen, filename,
(int)amt, line);
#else
fwrite(filename, fnlen, 1, stdout);
fputc('\n', stdout);
#endif
}
free(line);
return 0;
}
Who is online
Users browsing this forum: No registered users and 9 guests