filters now have a name
This commit is contained in:
27
Fonderie/t.c
27
Fonderie/t.c
@@ -28,15 +28,15 @@ int convert_to_gray; /* WTF ? */
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
|
||||
int essai_filterstack(char *fname)
|
||||
int essai_filterstack(char *fIname, char *fOname)
|
||||
{
|
||||
int foo;
|
||||
FloatImg image;
|
||||
double debut, fin;
|
||||
|
||||
filterstack_list(STK, __func__);
|
||||
// filterstack_list(STK, __func__);
|
||||
|
||||
foo = fimg_create_from_dump(fname, &image);
|
||||
foo = fimg_create_from_dump(fIname, &image);
|
||||
if (foo) {
|
||||
fprintf(stderr, "err %d create image\n", foo);
|
||||
exit(1);
|
||||
@@ -54,7 +54,7 @@ if (foo) {
|
||||
|
||||
fin = fimg_timer_set(TIMER);
|
||||
|
||||
foo = fimg_save_as_png(&image, "foo.png", 0);
|
||||
foo = fimg_export_picture(&image, fOname, 0);
|
||||
if (foo) {
|
||||
fprintf(stderr, "erreur export %d\n", foo);
|
||||
}
|
||||
@@ -74,10 +74,20 @@ exit(0);
|
||||
/* ----------------------------------------------------------- */
|
||||
void experiment(void)
|
||||
{
|
||||
int foo;
|
||||
|
||||
fprintf(stderr, "EXPERIMENT\n");
|
||||
|
||||
list_crapulors("experiment");
|
||||
|
||||
#if 0
|
||||
foo = crap_number_from_name("cos01");
|
||||
fprintf(stderr, "name cos01 -> %d\n", foo);
|
||||
foo = crap_number_from_name("xxxxx");
|
||||
fprintf(stderr, "name xxxxx -> %d\n", foo);
|
||||
#endif
|
||||
|
||||
exit(0); /* back to real world */
|
||||
}
|
||||
/* ----------------------------------------------------------- */
|
||||
|
||||
@@ -85,17 +95,20 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
int foo;
|
||||
int opt;
|
||||
char *filterchain = "18";
|
||||
char *filterchain = "0";
|
||||
char *infile = "mire.fimg";
|
||||
char *outfile = "out.png";
|
||||
|
||||
fprintf(stderr, "*** %s : compiled by tTh, %s %s\n", __FILE__,
|
||||
__DATE__, __TIME__);
|
||||
fimg_print_version(2);
|
||||
|
||||
while ((opt = getopt(argc, argv, "hF:vx")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "hF:i:o:vx")) != -1) {
|
||||
switch(opt) {
|
||||
case 'h': help(); break;
|
||||
case 'F': filterchain = optarg; break;
|
||||
case 'i': infile = optarg; break;
|
||||
case 'o': outfile = optarg; break;
|
||||
case 'v': verbosity++; break;
|
||||
case 'x': experiment(); break;
|
||||
default: exit(1);
|
||||
@@ -112,7 +125,7 @@ if (foo) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
foo = essai_filterstack(infile);
|
||||
foo = essai_filterstack(infile, outfile);
|
||||
if (foo) {
|
||||
fprintf(stderr, "err %d in essai_filterstack\n", foo);
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user