>except that the floodfill quality suffers
how's that? the idea of segmenting the target image, checking adjacency, and running through your call with a maximum reiterative depth should work as well as if you didn't have the problem of the stack. and i might do this before dealing with the stack manually, but as i'm aware you are more handy with the stack than i am so it's at your discretion...