embarquement de la fonderie
This commit is contained in:
42
Fonderie/crapulator.c
Normal file
42
Fonderie/crapulator.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user