inplace

inplace — in-place paintbox operations: flood, paste, line, circle

Stability Level

Stable, unless otherwise indicated

Synopsis

#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_blob_copy                  (IMAGE *in,
                                                         IMAGE *out,
                                                         int x,
                                                         int y,
                                                         PEL *ink);
int                 im_flood_other                      (IMAGE *mask,
                                                         IMAGE *test,
                                                         int x,
                                                         int y,
                                                         int serial);
int                 im_flood_other_copy                 (IMAGE *mask,
                                                         IMAGE *test,
                                                         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);

Description

These operations modify the input image. You can't easily use them in pipelines, but they are useful for paintbox-style programs.

Details

im_plotmask ()

int                 im_plotmask                         (IMAGE *im,
                                                         int ix,
                                                         int iy,
                                                         PEL *ink,
                                                         PEL *mask,
                                                         Rect *r);

im_smear ()

int                 im_smear                            (IMAGE *im,
                                                         int ix,
                                                         int iy,
                                                         Rect *r);

im_smudge ()

int                 im_smudge                           (IMAGE *im,
                                                         int ix,
                                                         int iy,
                                                         Rect *r);

im_paintrect ()

int                 im_paintrect                        (IMAGE *im,
                                                         Rect *r,
                                                         PEL *ink);

im_circle ()

int                 im_circle                           (IMAGE *im,
                                                         int cx,
                                                         int cy,
                                                         int radius,
                                                         int intensity);

im_insertplace ()

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 :

main image

sub :

sub-image to insert

x :

position to insert

y :

position to insert

Returns :

0 on success, or -1 on error.

im_fastline ()

int                 im_fastline                         (IMAGE *im,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2,
                                                         PEL *pel);

im_fastlineuser ()

int                 im_fastlineuser                     (IMAGE *im,
                                                         int x1,
                                                         int y1,
                                                         int x2,
                                                         int y2,
                                                         int (fn) (),
                                                         void *client1,
                                                         void *client2,
                                                         void *client3);

im_readpoint ()

int                 im_readpoint                        (IMAGE *im,
                                                         int x,
                                                         int y,
                                                         PEL *pel);

im_flood ()

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

im_flood_blob ()

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

im_flood_blob_copy ()

int                 im_flood_blob_copy                  (IMAGE *in,
                                                         IMAGE *out,
                                                         int x,
                                                         int y,
                                                         PEL *ink);

im_flood_other ()

int                 im_flood_other                      (IMAGE *mask,
                                                         IMAGE *test,
                                                         int x,
                                                         int y,
                                                         int serial);

im_flood_other_copy ()

int                 im_flood_other_copy                 (IMAGE *mask,
                                                         IMAGE *test,
                                                         IMAGE *out,
                                                         int x,
                                                         int y,
                                                         int serial);

im_lineset ()

int                 im_lineset                          (IMAGE *in,
                                                         IMAGE *out,
                                                         IMAGE *mask,
                                                         IMAGE *ink,
                                                         int n,
                                                         int *x1v,
                                                         int *y1v,
                                                         int *x2v,
                                                         int *y2v);