forked from tTh/FloatImg
added mollyguard
This commit is contained in:
parent
1840a5bddd
commit
3b7b4f234c
22
funcs/t.c
22
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);
|
||||
|
Loading…
Reference in New Issue
Block a user