- return 1;
-}
-
-static struct i_bitmap *
-i_flood_fill_low(i_img *im,int seedx,int seedy,
- int *bxminp, int *bxmaxp, int *byminp, int *bymaxp) {
- int lx,rx;
- int y;
- int direction;
- int dadLx,dadRx;
-
- int wasIn=0;
- int x=0;
-
- /* int tx,ty; */
-
- int bxmin=seedx,bxmax=seedx,bymin=seedy,bymax=seedy;
-
- struct llist *st;
- struct i_bitmap *btm;
-
- int channels,xsize,ysize;
- i_color cval,val;
-
- channels=im->channels;
- xsize=im->xsize;
- ysize=im->ysize;
-
- btm=btm_new(xsize,ysize);
- st=llist_new(100,sizeof(struct stack_element*));
-
- /* Get the reference color */
- i_gpix(im,seedx,seedy,&val);
-
- /* Find the starting span and fill it */
- lx = i_lspan(im, seedx, seedy, &val);
- rx = i_rspan(im, seedx, seedy, &val);
-
- /* printf("span: %d %d \n",lx,rx); */
-
- for(x=lx; x<=rx; x++) SET(x, seedy);
-
- ST_PUSH(lx, rx, lx, rx, seedy+1, 1);
- ST_PUSH(lx, rx, lx, rx, seedy-1, -1);
-
- while(st->count) {
- ST_POP();
-
- if (y<0 || y>ysize-1) continue;
-
- if (bymin > y) bymin=y; /* in the worst case an extra line */
- if (bymax < y) bymax=y;