/* * algua beep module */ #include #include #include #include "funcs.h" /* --------------------------------------------------------------------- */ /* * calculs sur une zone de l'image * valeur retournee entre 0 et 255 */ double niveau_zone(unsigned char *datas, int w, int h, Rect *rp) { unsigned char *bptr; int niveau = 0; int lig, col; int l2, c2, off; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %d %d %p )\n", __func__, datas, w, h, rp); fprintf(stderr, " > x %d y %d w %d h %d\n", rp->x, rp->y, rp->w, rp->h); #endif l2 = (rp->y+rp->h); c2 = (rp->x+rp->w); for (lig=rp->y; ligx); /* WTF ? */ bptr = datas + off; for (col=rp->x; colw * rp->h); } /* --------------------------------------------------------------------- */