VistaIOCopyBand(3)

okay so bestie πŸ’– welcome to the VistaIOCopyBand(3) page, straight out of the Library Functions Manual, section 3. It's short, it's sweet, and it does exactly one thing, but it does it flawlessly. Let's get into it 🫢


✨ 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 β€” the image you're copying from, aka the source image. your origin story πŸ’«
  • src_band β€” either one specific band of the source image to copy from, or the constant VistaIOAllBands if you want every band of the source copied. it's giving "all or one, no in-between" πŸ‘‘
  • dest β€” the image you're copying to, aka the destination image. the glow-up location 🌸
  • dest_band β€” the first band of the destination image that's gonna receive pixel values from the source. it's the starting seat at the table, not the whole table πŸ“

πŸ’– DESCRIPTION πŸ’–

VistaIOCopyBand copies pixel values from a source image, src, over to a destination image, dest. real talk though: those two images have to match on pixel representation, number of rows, and number of columns. no mismatches, no exceptions, periodt πŸ’€

If src_band is the constant VistaIOAllBands, then every single band of the source image's pixel values gets copied to the destination image, starting at the destination band dest_band. And because we're not just copying one lil band, the destination image needs at least dest_band + VistaIOImageNBands (src) - 1 bands. do the math bestie, we need room for everybody πŸ“

Otherwise, src_band names a single band of the source image. That one band gets copied into a single band, dest_band, of the destination image. In that case the destination image only needs at least dest_band + 1 bands. one in, one out, so simple, so clean ✨

⚠️ Heads up, and this is the important bit: unlike most Vista image processing routines, this one does not copy the source image's attributes over to the destination image. nope. not happening. attributes stay home 🏠 the pixels travel, the vibes don't.

🌈 RETURN VALUES 🌈

VistaIOCopyImage returns TRUE if it's successful and FALSE otherwise. πŸŽ‰

πŸ‘€ okay so yes, the page literally says VistaIOCopyImage right there in the return values, not VistaIOCopyBand. that's what it says, so that's what we're telling you. iykyk πŸ’…

🌟 SEE ALSO 🌟


πŸ’€ DIAGNOSTICS πŸ’€

  • No destination specified.'' `` β€” the destination image, dest, has got to be supplied. you can't copy into the void, bestie πŸ™ˆ
  • Band band referenced in image of nbands band(s).'' `` β€” the src_band (or dest_band) argument is outside the range of source (or destination) image band numbers. out of bounds, out of pocket, not allowed 🚫
  • Destination image has dest_nbands bands; nbands expected.'' `` β€” the destination image simply doesn't have enough bands. too few, can't sit with us 😭
  • ** Destination image has dest_prop property; src_prop expected.'' ** β€” here, "Property" is one of pixels'' , rows'' , or columns'' . it means the destination image doesn't have the same pixel representation, number of rows, and number of columns as the source image. they have to be twins, fr fr πŸ‘―

πŸ‘‘ AUTHOR πŸ‘‘

  • Art Pope <pope@cs.ubc.ca>
  • Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

and that's the whole page, bestie 🧚 you now know everything there is to know about copying bands. go forth and copy responsibly πŸ’œ

VistaIO Version 1.2.14 β€” dated 24 April 1993 ⭐ yes it's older than you and it still slays, that's main character energy for real πŸŽ€