xil_create_copy(3)
NAME
xil_create_copy − create a new image with a copy of the source’s data
SYNOPSIS
#include <xil/xil.h>
XilImage xil_create_copy ( XilImage src,
unsigned int xstart,
unsigned int ystart,
unsigned int width,
unsigned int height,
unsigned int startband,
unsigned int numbands);
DESCRIPTION
This routine creates a new image with its own copy of the source’s data. xstart is the horizontal offset in pixels from the upper-left corner of the source image to the upper-left corner of the subimage. ystart is the vertical offset in pixels from the upper-left corner of the source image to the upper-left corner of the subimage. width is the width of the subimage in pixels. height is the height of the subimage in pixels. startband is the offset in bands, starting from the first band, to the first band in the subimage. numbands is the number of bands in the subimage.
Copies of images have the same XilVersion number as the original image. The name of a copy is initially empty (NULL).
ROI Behavior
The default ROI is NULL. If an ROI is NULL, operations are performed on the entire image. The ROI and the origin of the source image are ignored in the copy operation.
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide.
EXAMPLES
Create a 512 x 512 5-band, 16-bit image. Then copy a 100 x 100 image that begins at offset (200, 250) comprising the middle 3 bands into a new image:
XilImage image1, image2;
image1 = xil_create(512, 512, 5, XIL_SHORT);
image2 = xil_create_copy (image1, 200, 250, 100, 100, 1, 3);
SEE ALSO
xil_create(3), xil_create_child(3), xil_create_from_device(3), xil_create_from_type(3), xil_create_from_window(3), xil_destroy(3), xil_set_roi(3), xil_get_roi(3).
SunOS — Last change: 09 June 1993