VistaIOCreateImage, VistaIOCreateImageLike - allocate memory for an image
Contents
Arguments
nbands Specifies the number of bands in the new image.
nrows Specifies the number of rows in the new image.
ncolumns Specifies the number of columns in the new image.
pixel_repn
Specifies the representation of pixels in the new image. It must be one of VistaIOBitRepn,
VistaIOUByteRepn, VistaIOSByteRepn, VistaIOShortRepn, VistaIOLongRepn, VistaIOFloatRepn, or
VistaIODoubleRepn.
src Specifies an image having the properties desired of the new image.
Description
VistaIOCreateImage allocates memory for a new image with the specified properties. Fields of the new
image structure are initialized, as are the image's row and band indices. Its pixel values, however, are
not initialized. The new image is given an empty attribute list. The size of its frame band
interpretation dimension (nframes) is set to nbands; its other band interpretation dimensions
(nviewpoints, ncolors, and ncomponents) are set to 1.
VistaIOCreateImageLike allocates memory for a new image with the same properties as src (same pixel
representation, and same numbers of bands, rows, and columns). Fields of the new image structure are
initialized, as are the image's row and band indices. Its pixel values, however, are not initialized.
The new image is given a copy of src's attribute list, and the sizes of its band interpretation
dimensions (nframes, ..., ncomponents) are set identical to those of src.
Diagnostics
``Invalid number of dimension: value.''
Dimension is ``bands'', ``rows'', or ``columns''. An inappropriate value, value, was specified
for that dimension.
``Invalid pixel representation: repn.''
The representation kind specified is not one of the valid pixel representations.
Name
VistaIOCreateImage, VistaIOCreateImageLike - allocate memory for an image
Return Values
If successful, these routines return a pointer to the newly-allocated image structure. Otherwise, ther
return NULLSee Also
VistaIODestroyImage(3), VistaIOImage(3)
Synopsis
#include<vistaio.h>VistaIOImageVistaIOCreateImage(nbands,nrows,ncolumns,pixel_repn)intnbands,nrows,ncolumns;VistaIORepnKindpixel_repn;VistaIOImageVistaIOCreateImageLike(src)VistaIOImagesrc;
