more debug or more bug ?
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "fonctions.h"
|
||||
#include "glitches.h"
|
||||
#include "crapulator.h"
|
||||
#include "filterstack.h"
|
||||
|
||||
int verbosity;
|
||||
int convert_to_gray;
|
||||
@@ -130,9 +131,14 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
|
||||
}
|
||||
|
||||
/* fscking input filter here */
|
||||
foo = crapulator(&input, infx, 0.42);
|
||||
if (infx) {
|
||||
foo = crapulator(&input, infx, maxvalue);
|
||||
}
|
||||
else {
|
||||
foo = filterstack_run(0, &input, 0);
|
||||
}
|
||||
if (foo) {
|
||||
fprintf(stderr, "%s crapulator -> %d\n", __func__, foo);
|
||||
fprintf(stderr, "%s: input filter -> %d\n", __func__, foo);
|
||||
exit(1);
|
||||
}
|
||||
foo = traite_une_image(&input, outfx, step, outdir);
|
||||
@@ -165,6 +171,8 @@ void help(void)
|
||||
{
|
||||
puts("\tFONDERIE\noptions:");
|
||||
|
||||
puts("\t-E input:filter:chain");
|
||||
puts("\t-F output:filter:chain");
|
||||
puts("\t-g\tconvert to gray");
|
||||
puts("\t-I\tinput glob pattern");
|
||||
puts("\t-O\toutput directory");
|
||||
@@ -186,13 +194,17 @@ int in_effect = 0;
|
||||
int out_effect = 0;
|
||||
int steps = 1;
|
||||
int blanks = 20;
|
||||
char *InFchain = "0";
|
||||
char *OutFchain = "0";
|
||||
|
||||
fprintf(stderr, "*** %s :\n\tcompiled by tTh, %s %s\n\tpid %d\n",
|
||||
argv[0], __DATE__, __TIME__, getpid());
|
||||
fimg_print_version(2);
|
||||
|
||||
while ((opt = getopt(argc, argv, "B:ghI:O:s:T:vw:x:")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "B:E:F:ghI:O:s:T:vw:x:")) != -1) {
|
||||
switch(opt) {
|
||||
case 'E': InFchain = optarg; break;
|
||||
case 'F': OutFchain = optarg; break;
|
||||
case 'B': blanks = atoi(optarg);
|
||||
break;
|
||||
case 'g': convert_to_gray = 1;
|
||||
@@ -221,6 +233,17 @@ if (verbosity) {
|
||||
fprintf(stderr, "output dir '%s'\n", out_dir);
|
||||
}
|
||||
|
||||
foo = parse_filter_chain(0, InFchain);
|
||||
if (foo) {
|
||||
fprintf(stderr, "err %d parsing '%s'\n", foo, InFchain);
|
||||
exit(1);
|
||||
}
|
||||
foo = parse_filter_chain(1, OutFchain);
|
||||
if (foo) {
|
||||
fprintf(stderr, "err %d parsing '%s'\n", foo, OutFchain);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
foo = demarre_la_machine(in_pattern, out_dir, fifosize, in_effect,
|
||||
out_effect, steps, blanks);
|
||||
fprintf(stderr, "retour du big-run de la machine -> %d\n", foo);
|
||||
|
||||
Reference in New Issue
Block a user