VistaIOGetPixel(3)

πŸ’– VistaIOGetPixel πŸ’–

okay so bestie, we're in section 3 of the Library Functions Manual today, and this page is about VistaIOGetPixel and VistaIOSetPixel β€” the two lil functions that let you peek at a pixel and then absolutely rearrange it. get and set. that's the whole vibe. ✨


🌸 NAME 🌸

VistaIOGetPixel, VistaIOSetPixel β€” get and set pixel values

lowkey the entire personality of this page right here. one grabs, one gives. iconic duo behavior. πŸ’…


✨ SYNOPSIS ✨

#include <vistaio.h>

VistaIODouble VistaIOGetPixel (image, band, row, column)
       VistaIOImage image;
       int band, row, column;

void VistaIOSetPixel (image, band, row, column, value)
       VistaIOImage image;
       int band, row, column;
       VistaIODouble value;

yes it's the old-school K&R-style declaration situation, we love a vintage moment. πŸŽ€


🫢 ARGUMENTS 🫢

  • image β€” the image that's holding the pixel. this is the one you're reaching into. πŸ¦‹
  • band, row, column β€” the coordinates, fr fr. which band, which row, which column β€” like a little address for exactly one pixel. no cap. πŸ“
  • value β€” the pixel's new value. what you're setting it to. the glow-up. πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

VistaIOGetPixel fetches the value of the specified pixel and hands it back to you as a VistaIODouble. and if the image's actual pixel representation is something else? it casts, no big deal, it just does the conversion for you. considerate king behavior. πŸ‘‘

VistaIOSetPixel sets the specified pixel to value, casting it to the image's actual pixel representation if necessary. so you can just toss it whatever and it'll make it fit. that's the way that it works. ✨


⭐ RETURN VALUES ⭐

VistaIOGetPixel returns the value of the specified pixel. that's it. that's the tea. πŸ“

(VistaIOSetPixel returns void, so it's giving nothing back β€” it just does the thing and dips. πŸ™ˆ)


🌈 SEE ALSO 🌈

VistaIOImage(3)


πŸ’œ NOTES πŸ’œ

If the image is known to have a particular pixel representation then the VistaIOPixel macro (see VistaIOImage(3)) can be used, instead, yielding greater efficiency.

translation bestie: if you already know what the pixel representation is, skip these and use the VistaIOPixel macro instead β€” it's faster. iykyk. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Art Pope <pope@cs.ubc.ca>

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

legends, both of them. we stan. 🫢


and that's the whole page, bestie!! this was VistaIO Version 1.2.14, dated 24 April 1993 β€” yes she's an elder but she still slays, and we are obsessed. go forth and get and set those pixels. periodt. πŸ’…βœ¨πŸŽ€