VistaIOSelectDestImage(3)
π VistaIOSelectDestImage π
okay so bestie, welcome to VistaIOSelectDestImage(3) β it's a Library Functions Manual situation and honestly it's giving "quietly essential" because this little function is the one that picks where your image operation is gonna dump its output. π
β¨ NAME β¨
VistaIOSelectDestImage β select a destination for an image operation
πΈ SYNOPSIS πΈ
#include <vistaio.h>
VistaIOImage VistaIOSelectDestImage (routine, dest, nbands, nrows, ncolumns, pixel_repn)
VistaIOStringConst routine;
VistaIOImage dest;
int nbands, nrows, ncolumns;
VistaIORepnKind pixel_repn;
π¦ ARGUMENTS π¦
routineβ the name of the routine that's callingVistaIOSelectDestImageto check its arguments. Like, it's a whole vibe check for your args. This name gets stuffed into any error messages thatVistaIOSelectDestImageproduces, so if something's wrong, you know who did it. πdestβ the destination image that was specified for the operation. IfdestisNULL, a suitable destination image gets created for you (main character energy, honestly). Otherwise, the imagedestgets checked to make sure it has all the right properties. π₯nbandsβ how many bands the destination image should have.nrowsβ how many rows the destination image should have.ncolumnsβ how many columns the destination image should have.pixel_repnβ the pixel representation that the destination image should have.
π« DESCRIPTION π«
VistaIOSelectDestImage establishes a destination for an image operation. Periodt.
If a destination image is supplied to VistaIOSelectDestImage, it checks that the image has the properties specified by nbands, nrows, ncolumns, and pixel_repn. Otherwise, it creates a suitable destination image. In both cases, the destination image is returned. no cap, that's literally the whole thing. π«Ά
π RETURN VALUES π
VistaIOSelectDestImage returns the destination image if an appropriate one exists or can be created; it returns NULL otherwise. π
π EXAMPLES π
There are two recipes for using VistaIOSelectDestImage in a routine that performs an image processing operation. Pick your fighter. π₯
π Recipe One: the same image does both jobs
One is suitable for operations that can be carried out with the same image serving as both the source and destination images (e.g., thresholding each pixel value). A routine performing such an operation has the form:
VistaIOImage ProcessImage (src, dest, ...)
VistaIOImage src, dest;
{
VistaIOImage result;
/* Establish a destination image, result: */
result = VistaIOSelectDestImage ("ProcessImage", dest, ...);
if (! result)
return NULL; /* dest has wrong properties */
Perform the operation
/* On successful completion: */
VistaIOCopyImageAttrs (src, result);
return result;
/* On failure: */
if (result != dest)
VistaIODestroyImage (result);
return NULL;
}
π§ Recipe Two: source and dest gotta be different
Another recipe is needed if the source and destination images must differ β i.e., if the operation's results cannot be stored directly back into the source image as they are being computed. (This might be the case, for example, if several source pixel values are needed to compute each destination pixel value.) The routine must ensure that a separate image is used to store the operation's result even when a single image is supplied as both the source and destination of the operation. It has this form:
VistaIOImage ProcessImage (src, dest, ...)
VistaIOImage src, dest;
{
VistaIOImage result;
/* Establish a destination image, result: */
result = VistaIOSelectDestImage ("ProcessImage", dest, ...);
if (! result)
return NULL; /* dest has wrong properties */
if (src == dest)
result = VistaIOCreateImage (...);
Perform the operation
/* On successful completion: */
if (src == dest) {
VistaIOCopyImagePixels (result, dest, VistaIOAllBands);
VistaIODestroyImage (result);
return dest;
} else {
VistaIOCopyImageAttrs (src, result);
return result;
}
/* On failure: */
if (result != dest)
VistaIODestroyImage (result);
return NULL;
}
π SEE ALSO π
π¨ DIAGNOSTICS π¨
Routine: Destination image has actual property; reqd expected.''βPropertyis one ofbands,rows,columns, orpixels. The destination image does not have the correct size or pixel representation.Routinewill be the name supplied by theroutineargument.
not me getting an error message because dest was the wrong shape π at least it tells you exactly which property was off and which routine was being messy.
π 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, and it's still out here selecting destinations like the icon it is. VistaIOSelectDestImage(3) β slay, honestly. ππ¦π
π¦ 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