Made the floodFill in Image.fill() nonrecursive