Method

VipsImagedraw_image

Declaration [src]

int
vips_draw_image (
  VipsImage* image,
  VipsImage* sub,
  int x,
  int y,
  ...
)

Description [src]

Draw sub on top of image at position x, y.

The two images must have the same Coding. If sub has 1 band, the bands will be duplicated to match the number of bands in image. sub will be converted to images format, see vips_cast().

Use mode to set how pixels are combined. If you use VipsCombineMode, both images must be uncoded.

::: tip “Optional arguments” * mode: VipsCombineMode, how to combine pixels

::: seealso vips_draw_mask(), vips_insert().

Parameters

sub VipsImage
 

Image to paint.

 The data is owned by the caller of the function.
x int
 

Draw sub here.

y int
 

Draw sub here.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, or -1 on error.