added mollyguard

This commit is contained in:
tth 2020-02-27 13:16:00 +01:00
parent 1840a5bddd
commit 3b7b4f234c
1 changed files with 17 additions and 5 deletions

View File

@ -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);