VistaIOCopyImage(3) | Library Functions Manual | VistaIOCopyImage(3) |
VistaIOCopyImage - copy an image
#include <vistaio.h>
VistaIOImage VistaIOCopyImagePixels (src, dest, band)
VistaIOImage src, dest; VistaIOBand band;
VistaIOImage VistaIOCopyImageAttrs (src, dest)
VistaIOImage VistaIOCopyImage (src, dest, band)
VistaIOCopyImagePixels copies pixel values from the source image to the destination image. (No other image properties are copied.)
VistaIOCopyImageAttrs copies attributes from the source image to the destination image. (No pixel values are copied.) If the destination image already has an attribute list, it is first deleted. Then the destination image is given a copy of the source image's attribute list. Finally, if the source and destination images do not have the same number of bands then the destination image's band interpretation attributes may be edited to ensure their validity:
VistaIOCopyImage copies both pixel values and attributes from one image to the other. It is equivalent to calling both VistaIOCopyImagePixels and VistaIOCopyImageAttrs.
You can specify NULL as a destination image to any of these routines; they will then create an appropriate destination image, copy to it, and return it. If you supply a destination image to VistaIOCopyImage or VistaIOCopyImagePixels, it must have the same number of rows, number of columns, and pixel representation as the source image; also, it must have a number of bands consistent with src and band.
Each of these routines returns the destination image if it is successful and NULL otherwise.
VistaIOCopyAttrList(3) is used to copy attributes from the source image to the destination image. Thus the destination image's attribute list contains its own copy of each attribute value — except that for a VistaIOPointer value, the pointer is copied but not the (opaque) data structure to which it points.
Art Pope <pope@cs.ubc.ca>
Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
24 April 1993 | VistaIO Version 1.2.14 |