diff --git a/funcs/t.c b/funcs/t.c index 2a8dc128..50a7734c 100644 --- a/funcs/t.c +++ b/funcs/t.c @@ -35,11 +35,15 @@ else { foo = fimg_save_as_pnm(&fimg, "source.pnm", 0); -for (idx=0; idx<20; idx++) { +/* + * running multiple filters so you can + * watch the up-left shift :) + */ +for (idx=0; idx<10; idx++) { foo = fimg_lissage_2x2(&fimg); foo = fimg_killborders(&fimg); - sprintf(buffer, "filter%03d.pnm", idx); - foo = fimg_save_as_pnm(&fimg, buffer, 0); + sprintf(buffer, "filter%03d.png", idx); + foo = fimg_save_as_png(&fimg, buffer, 0); } fimg_destroy(&fimg); @@ -54,7 +58,11 @@ int foo; if (NULL != infile) { fprintf(stderr, "loading %s\n", infile); - fimg_create_from_dump(infile, &fimg); + foo = fimg_create_from_dump(infile, &fimg); + if (foo) { + fprintf(stderr, "%s: err load '%s'\n", __func__, infile); + return foo; + } } else { fimg_create(&fimg, 512, 512, FIMG_TYPE_RGB); @@ -85,7 +93,11 @@ int foo; if (NULL != infile) { fprintf(stderr, "loading %s\n", infile); - fimg_create_from_dump(infile, &fimg); + foo = fimg_create_from_dump(infile, &fimg); + if (foo) { + fprintf(stderr, "%s: err load '%s'\n", __func__, infile); + return foo; + } } else { fimg_create(&fimg, 512, 512, FIMG_TYPE_RGB);