Browse Source

better (?) error messages

master
tth 3 years ago
parent
commit
5726161571
  1. 5
      funcs/fimg-png.c

5
funcs/fimg-png.c

@ -64,7 +64,8 @@ fprintf(stderr, "%s opened\n", filename); @@ -64,7 +64,8 @@ fprintf(stderr, "%s opened\n", filename);
datasize = png.width * png.height * png.bpp;
if ( 3 != png.bpp ) {
fprintf(stderr, "format %d of '%s' not supported\n",
/* I don't really understand this part of the code */
fprintf(stderr, "bpp format %d of '%s' not supported\n",
png.color_type, filename);
return -21;
}
@ -93,7 +94,7 @@ if (foo) { @@ -93,7 +94,7 @@ if (foo) {
foo = png_get_data(&png, datas);
if (PNG_NO_ERROR != foo) {
fprintf(stderr, "error in '%s' : read png -> %d %s\n",
fprintf(stderr, "error in '%s' :\n\tpng_get_data -> %d = %s\n",
__func__, foo, pngerr2str(foo));
return foo;
}

Loading…
Cancel
Save