/* * crapulator.c */ #include #include #include #include "crapulator.h" /* -------------------------------------------------------------- */ int crapulator(FloatImg *image, int notused) { int retval; FloatImg imgtmp; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %d )\n", __func__, image, notused); #endif /* contour 2x2 don't work inplace */ fimg_clone(image, &imgtmp, 0); /* so we work on a copy */ retval = fimg_contour_2x2(image, &imgtmp, 0); if (retval) { fprintf(stderr, "%s : err contour %d\n", __func__, retval); exit(1); } /* and put back porcessed pixels */ fimg_copy_data(&imgtmp, image); fimg_destroy(&imgtmp); return 0; } /* -------------------------------------------------------------- */