---
name: "im_flood"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_flood"
---

# im\_flood(3)

flood a area

## NAME

im\_flood, im\_flood\_blob - flood a area

## SYNOPSIS

**#include \<vips/vips.h\>**

int im\_flood( im, x, y, ink, dout )\
 IMAGE \*im;\
 int x, y;\
 PEL \*ink;\
 Rect \*dout;

int im\_flood\_blob( im, x, y, ink, dout )\
 IMAGE \*im;\
 int x, y;\
 PEL \*ink;\
 Rect \*dout;

## DESCRIPTION

**im\_flood()** fills an enclosed area from a starting point, painting ink into 4-way connected pels whose colour is not equal to ink.

**im\_flood\_blob()** floods with the ink colour, finding pels 4-way connected to the start pel which are the same colour as the start pel. It is useful for changing the colour of a blob of pels which all have the same value.

## RETURN VALUE

All functions return 0 on success and -1 on error.

## SEE ALSO

[im\_insertplace(3)](/im_insertplace/3.md), [im\_smudge(3)](/im_smudge/3.md).
