diff --git a/Fonderie/fonctions.c b/Fonderie/fonctions.c index 80fba59..878f528 100644 --- a/Fonderie/fonctions.c +++ b/Fonderie/fonctions.c @@ -120,10 +120,6 @@ int insert_picture(FloatImg *src) FloatImg *dst; int nbre; -/* - * this is the where we can insert the 'input filter' - */ - dst = &g_fifo.slots[g_fifo.next]; nbre = dst->width * dst->height * sizeof(float); diff --git a/Fonderie/fonderie.c b/Fonderie/fonderie.c index 5f9e94d..3136e4b 100644 --- a/Fonderie/fonderie.c +++ b/Fonderie/fonderie.c @@ -43,20 +43,49 @@ int insert_blank(FloatImg *image, int nbre, int pproc, float fval, char *outd) { int idx, foo; +int preloaded = 0; +FloatImg blank; +char *fname; + +#if DEBUG_LEVEL +fprintf(stderr, ">>> %s ( %p %d %d %f '%s' )\n", __func__, + image, nbre, pproc, fval, outd); +#endif + +if (NULL != (fname=getenv("BLANK_FIMG"))) { + fprintf(stderr,"try to load %s\n", fname); + fimg_clone(image, &blank, 1); + foo = fimg_load_from_dump(fname, &blank); + if (foo) { + fprintf(stderr, "epic fail %d on %s\n", foo, fname); + exit(1); + } + if (verbosity) fimg_describe(&blank, "Blank pic"); + preloaded = 1; + } fimg_clear(image); for (idx=0; idx