logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

VistaIOCreateImage, VistaIOCreateImageLike - allocate memory for an image

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.

Author

       Art Pope <pope@cs.ubc.ca>

       Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

VistaIO Version 1.2.14                            24 April 1993                            VistaIOCreateImage(3)

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 NULL

See Also

VistaIODestroyImage(3), VistaIOImage(3)

Synopsis

#include<vistaio.h>VistaIOImageVistaIOCreateImage(nbands,nrows,ncolumns,pixel_repn)intnbands,nrows,ncolumns;VistaIORepnKindpixel_repn;VistaIOImageVistaIOCreateImageLike(src)VistaIOImagesrc;

See Also