VistaIOCombineBands(3)
π VistaIOCombineBands β bestie edition π
okay so you're in the VistaIOCombineBands(3) zone of the Library Functions Manual, and honestly? iconic. this is the page that teaches you how to β¨combine bandsβ¨ β like, grab bands from a bunch of source images and stack them into one destination image. two functions do the job: VistaIOCombineBands and VistaIOCombineBandsVa, and they both literally just copy a series of image bands. no cap. π
π SYNOPSIS π
#include <vistaio.h>
VistaIOImage VistaIOCombineBands (nels, src_images, src_bands, dest)
int nels;
VistaIOImage src_images[], dest;
VistaIOBand src_bands[];
VistaIOImage VistaIOCombineBandsVa (dest, src_image1, src_band1, ..., NULL)
VistaIOImage dest, src_image1;
VistaIOBand src_band1;
π¦ ARGUMENTS π¦
nelsβ the number of elements hanging out in thesrc_imagesandsrc_bandsarrays. that's it, that's the count. πsrc_imagesβ an array of images that hold the bands you wanna copy. aka the source images, the ones doing the giving. π«Άsrc_bandsβ an array that says which bands get copied. each element is either one specific band of the matching source image, or the constantVistaIOAllBands, which is the "give me EVERYTHING from this image" option. πdestβ either an image you already have that you wanna copy into (the destination image), orNULLif you want a shiny new destination image created for you. β¨src_image1β the first image holding a band (or bands) to be copied. the first source image, the opener, the main character. πsrc_band1β either one particular band ofsrc_image1to copy, or the constantVistaIOAllBandsto say "yeah take all ofsrc_image1's bands, idc." π«
πΈ DESCRIPTION πΈ
VistaIOCombineBands copies bands of pixel values from various source images into a destination image. the source images are listed in the array src_images, and the band(s) to copy from each one are listed in the array src_bands. both arrays must have nels elements β no more, no less, periodt.
a src_bands element can be VistaIOAllBands, which means all bands of that corresponding source image get copied, or it can be a particular band number, which means only that one band of the corresponding source image gets copied. lowkey simple, highkey powerful. π
VistaIOCombineBandsVa is the same vibe, except the source images and band numbers come in through a variable-length argument list. that list holds one or more pairs shaped like src_image1, src_band1, and it's terminated by the value NULL. π
β οΈ okay important: all source images must have the same pixel representation, number of rows, and number of columns. like, they all gotta match. (the original says "must have have" β typo and all, we keep it real here, bestie π)
if dest is NULL, a destination image gets created with the same pixel representation, number of rows, and number of columns as the source images. it's created with a number of bands equal to the total number of bands being copied. slay. β¨
otherwise dest specifies an image to copy pixel values into. it must have the same pixel representation, number of rows, and number of columns as the source image, and it must have a number of bands equal to the total number of bands to be copied. no shortcuts. π
source image bands, taken in the sequence you specified, get copied into consecutive destination image bands. so the order you list them is the order they land. iykyk. π§
π RETURN VALUES π
both routines return the destination image if everything works out, and NULL otherwise. simple as that, bestie. π
π₯ SEE ALSO π₯
VistaIOCopyBand(3), VistaIOCopyImage(3), VistaIOImage(3),
π NOTES π
no attributes are copied from any source images to the destination image. like, zero. none. the vibes stay where they are. π«Ά
π DIAGNOSTICS π
Band band referenced in image of nbands band(s).β bandbandis supposed to be copied from a source image that hasnbandsbands. exceptbandis outside the range[0, nbands - 1]. so yeah, out of bounds, we don't do that. πDestination image has dest_nbands bands; src_nbands expected.β a destination image was specified, but it has the wrong number of bands. mismatch behavior, not cute. πDestination image has dest_prop property; src_prop expected.βpropertyis one ofpixels'',rows'', or ``columns''. a destination image was specified but it doesn't have the same pixel representation, number of rows, and number of columns as the source images. basically a vibe check that failed. π
π AUTHOR π
Art Pope <pope@cs.ubc.ca>
Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
and that's the whole page, bestie!! this was VistaIO Version 1.2.14, dated 24 April 1993 β yeah she's vintage, she's a classic, and she still ate. go combine some bands, you got this π β¨π¦
π¦ where this page comes from
- debian bookworm: libvistaio-dev 1.2.19-3 Β· libvista-orig
- debian trixie: libvistaio-dev 1.2.19-3+b2 Β· libvista-orig
- ubuntu jammy: libvistaio-dev 1.2.19-3 Β· libvista-orig
- ubuntu noble: libvistaio-dev 1.2.19-3 Β· libvista-orig
- ubuntu questing: libvistaio-dev 1.2.19-4
- ubuntu resolute: libvistaio-dev 1.2.19-4build1 Β· libvista-orig
- ubuntu stonking: libvistaio-dev 1.2.19-4build1 Β· libvista-orig
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms