---
name: "VistaIOCopyBand"
section: "3"
platform: "linux"
package: "libvistaio-dev"
version: "1.2.19-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/VistaIOCopyBand"
---

# VistaIOCopyBand(3)

copy image pixel values

## NAME

VistaIOCopyBand - copy image pixel values

## SYNOPSIS

```
#include <vistaio.h>
```

**VistaIOBoolean VistaIOCopyBand (*src*, *src\_band*, *dest*, *dest\_band*)**

**VistaIOImage *src*, *dest*;** **VistaIOBand *src\_band*, *dest\_band*;**

## ARGUMENTS

- *src*

  Specifies the image to copy from (the source image).

- *src\_band*

  May specify a particular band of the source image to copy from, or may be **VistaIOAllBands** to indicate that all bands of the source image should be copied.

- *dest*

  Specifies the image to copy to (the destination image).

- *dest\_band*

  Specifies the first band of the destination image to receive pixel values from the source image.

## DESCRIPTION

**VistaIOCopyBand** copies pixel values from a source image, *src*, to a destination image, *dest*. The two images must have the same pixel representation, number of rows, and number of columns.

If *src\_band* is the constant **VistaIOAllBands**, all of the source  image's bands of pixel values are copied to the destination image beginning at the destination band *dest\_band*. The destination image must have at least *dest\_band* + **VistaIOImageNBands** (*src*) - 1 bands.

Otherwise, *src\_band* specifies a single band of the source image. That band is copied to a single band, *dest\_band*, of the destination image. The destination image must have at least *dest\_band* + 1 bands.

Unlike most Vista image processing routines, this one does not copy the source image's attributes to the destination image.

## RETURN VALUES

**VistaIOCopyImage** returns  **TRUE** if it is successful and  **FALSE** otherwise.

## SEE ALSO

[**VistaIOCopyImage**(3)](/VistaIOCopyImage/3.md), [**VistaIOCombineBands**(3)](/VistaIOCombineBands/3.md), [**VistaIOImage**(3)](/VistaIOImage/3.md),

## DIAGNOSTICS

- \`\`No destination specified.''

  The destination image, *dest* must be supplied.

- \`\`Band *band* referenced in image of *nbands* band(s).''

  The *src\_band* (*dest\_band*) argument is outside the range of source (destination) image band numbers.

- \`\`Destination image has *dest\_nbands* bands; *nbands* expected.''

  The destination image has too few bands.

- \`\`Destination image has *dest\_prop* *property*; *src\_prop* expected.''

  *Property* is one of \`\`pixels'', \`\`rows'', or \`\`columns''. The destination image does not have the same pixel representation, number of rows, and number of columns as the source image.

## AUTHOR

Art Pope \<pope@cs.ubc.ca\>

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