Bibliothèque de traitements d'images en virgule flottante. http://la.buvette.org/photos/cumul/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FloatImg/Fonderie/crapulator.c

43 lines
763 B

/*
* crapulator.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <floatimg.h>
#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;
}
/* -------------------------------------------------------------- */