![]() |
![]() |
![]() |
VIPS Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <vips/vips.h> int im_plotmask (IMAGE *im
,int ix
,int iy
,PEL *ink
,PEL *mask
,Rect *r
); int im_smear (IMAGE *im
,int ix
,int iy
,Rect *r
); int im_smudge (IMAGE *im
,int ix
,int iy
,Rect *r
); int im_paintrect (IMAGE *im
,Rect *r
,PEL *ink
); int im_circle (IMAGE *im
,int cx
,int cy
,int radius
,int intensity
); int im_insertplace (IMAGE *main
,IMAGE *sub
,int x
,int y
); int im_fastline (IMAGE *im
,int x1
,int y1
,int x2
,int y2
,PEL *pel
); int im_fastlineuser (IMAGE *im
,int x1
,int y1
,int x2
,int y2
,int (fn) ()
,void *client1
,void *client2
,void *client3
); int im_readpoint (IMAGE *im
,int x
,int y
,PEL *pel
); int im_flood (IMAGE *im
,int x
,int y
,PEL *ink
,Rect *dout
); int im_flood_blob (IMAGE *im
,int x
,int y
,PEL *ink
,Rect *dout
); int im_flood_other (IMAGE *test
,IMAGE *mark
,int x
,int y
,int serial
,Rect *dout
); int im_flood_copy (IMAGE *in
,IMAGE *out
,int x
,int y
,PEL *ink
); int im_flood_blob_copy (IMAGE *in
,IMAGE *out
,int x
,int y
,PEL *ink
); int im_flood_other_copy (IMAGE *test
,IMAGE *mark
,IMAGE *out
,int x
,int y
,int serial
); int im_lineset (IMAGE *in
,IMAGE *out
,IMAGE *mask
,IMAGE *ink
,int n
,int *x1v
,int *y1v
,int *x2v
,int *y2v
);
These operations modify the input image. You can't easily use them in pipelines, but they are useful for paintbox-style programs.
int im_insertplace (IMAGE *main
,IMAGE *sub
,int x
,int y
);
Copy sub
into main
at position x
, y
. The two images must match in
format, bands and coding.
This an inplace operation, so main
is changed. It does not thread and will
not work well as part of a pipeline.
See also: im_insert()
.
|
main image |
|
sub-image to insert |
|
position to insert |
|
position to insert |
Returns : |
0 on success, or -1 on error. |
int im_fastlineuser (IMAGE *im
,int x1
,int y1
,int x2
,int y2
,int (fn) ()
,void *client1
,void *client2
,void *client3
);
int im_flood (IMAGE *im
,int x
,int y
,PEL *ink
,Rect *dout
);
Flood-fill im
with ink
, starting at position x
, y
. The filled area is
bounded by pixels that are equal to the ink colour, in other words, it
searches for pixels enclosed by a line of ink
.
The bounding box of the modified pixels is returned in dout
.
This an inplace operation, so im
is changed. It does not thread and will
not work well as part of a pipeline. On 32-bit machines, it will be limited
to 2GB images.
See also: im_flood_blob()
, im_flood_other()
, im_flood_blob_copy()
.
|
image to fill |
|
position to start fill |
|
position to start fill |
|
colour to fill with |
|
output the bounding box of the filled area |
Returns : |
0 on success, or -1 on error. |
int im_flood_blob (IMAGE *im
,int x
,int y
,PEL *ink
,Rect *dout
);
Flood-fill im
with ink
, starting at position x
, y
. The filled area is
bounded by pixels that are equal to the start pixel, in other words, it
searches for a blob of same-coloured pixels.
The bounding box of the modified pixels is returned in dout
.
This an inplace operation, so im
is changed. It does not thread and will
not work well as part of a pipeline. On 32-bit machines, it will be limited
to 2GB images.
See also: im_flood()
, im_flood_other()
, im_flood_blob_copy()
.
|
image to fill |
|
position to start fill |
|
position to start fill |
|
colour to fill with |
|
output the bounding box of the filled area |
Returns : |
0 on success, or -1 on error. |
int im_flood_other (IMAGE *test
,IMAGE *mark
,int x
,int y
,int serial
,Rect *dout
);
Flood-fill mark
with serial
, starting at position x
, y
. The filled
area is bounded by pixels in test
that are equal to the start pixel, in
other words, it searches test
for a blob of same-coloured pixels, marking
those pixels in mark
with serial
.
The bounding box of the modified pixels is returned in dout
.
This an inplace operation, so mark
is changed. It does not thread and will
not work well as part of a pipeline. On 32-bit machines, it will be limited
to 2GB images.
See also: im_flood()
, im_label_regions()
, im_flood_blob_copy()
.
|
image to test |
|
image to mark |
|
position to start fill |
|
position to start fill |
|
mark pixels with this number |
|
output the bounding box of the filled area |
Returns : |
0 on success, or -1 on error. |
int im_flood_other_copy (IMAGE *test
,IMAGE *mark
,IMAGE *out
,int x
,int y
,int serial
);