VistaIOReadImages(3)

πŸ’– VistaIOReadImages(3) β€” Library Functions Manual πŸ’–

okay bestie, so we're in the library functions manual and this page is literally called VistaIOReadImages. it's giving "read a whole lil series of images off a stream" energy and honestly? iconic. let's get into it πŸ¦‹


✨ NAME ✨

VistaIOReadImages β€” read a series of images from a stream 🌸


✨ SYNOPSIS ✨

#include <stdio>
#include <vistaio.h>
#include <vistaio.h>

int VistaIOReadImages (file, attributes, images)
       FILE *file;
       VistaIOAttrList *attributes;
       VistaIOImage (*images)[];

(yes, <vistaio.h> really is included twice up there. that's not a typo, that's just how the page says it. we don't question the ancients πŸ’…)


✨ ARGUMENTS ✨

  • file β€” the open stream you want the images read from. open stream, bestie. it's gotta be open. πŸ‘‘
  • attributes β€” returns a list of attributes that got read from the stream. so like, everything that isn't a top-level image ends up chillin' in here. πŸŽ€
  • images β€” returns a vector of pointers to the images that got read. the main characters of this whole operation fr fr. 🌟

✨ DESCRIPTION ✨

So VistaIOReadImages reads a Vista data file from an open stream, collects all the top-level images it finds, and hands you those images back separately from everything else in the file. like, it separates the images from the rest of the file's contents. clean. organized. we love a queen who declutters 🧚

For backwards compatibility (aww, it's sentimental 😭), VistaIOReadImages will also recognize and read an image in the UBC image file format (IFF). Here's the trick: if the very first character read from the stream is an `I`, then VistaIOReadImages uses VistaIOReadUbcIff to read and return a single UBC IFF image. one character decides the whole vibe check. πŸ’€


✨ RETURN VALUES ✨

VistaIOReadImages returns the number of images it got, or 0 if an error shows up. 🚨 A vector of the images gets allocated and handed back through images. And any other objects it finds in the file? those get returned as an attribute list through attributes. so nothing gets left behind, everything gets a home 🫢


✨ SEE ALSO ✨

go read those too, bestie, they're all in the same friend group 🌈


✨ DIAGNOSTICS ✨

Besides the following, any of the diagnostics produced by VistaIOReadFile may also be generated. so keep an eye out for those too πŸ‘€

  • No image objects present in stream.'' `` β€” no images were encountered in the specified stream. literally zero. empty. a wasteland 😭

✨ AUTHOR ✨

Art Pope <pope@cs.ubc.ca> πŸ’Œ

Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com> πŸ’Œ


and that's the whole page, bestie!! you absolutely ate this one πŸ“ This was VistaIO Version 1.2.14, dated 24 April 1993 β€” yes, 1993, it's vintage, it's a classic, it's lowkey a museum piece and we're obsessed. mwah πŸ’…βœ¨πŸŽ€