IM_EXTRACT(3X)

NAME
im_embed - extract a portion of an image

SYNOPSIS
#include <vips/vips.h> int im_embed( in, out, type, x, y, w, h )
IMAGE *in, *out;
int type;
int x, y, w, h;

DESCRIPTION
im_embed() embedds in within a larger image (size w by h), with in's top left-hand corner at position (x,y) within the output image. The value of type controls what appears in the new pels. For now, this should always be zero, but in the future other options may be implemented:
 0 - black pels (only flag supported in this version)
 1 - mirror pels from image
 2 - tile pels from image
 3 - extend pels from image to edge
 4 - etc. Works for any size image, any number of bands, any type. Works for LABPACK coded images too! This is a special PIO functions, and effectively adds no execution time penalty if used with other PIO operations. It is used by im_fastcor(), im_spcor(), im_conv() etc. to add black borders to their output images.

RETURN VALUE
The function returns 0 on success and -1 on error.

SEE ALSO
im_insert(3X), im_extract(3X), im_region_region(3X), im_fill_copy(3X).

COPYRIGHT
National Gallery, 1995.

AUTHOR
J. Cupitt - 11/04/1990