VistaIOCopyImage(3)
π VistaIOCopyImage(3) β like, the copy-paste of images, bestie π
okay so this is a page from the Library Functions Manual, and it's literally all about copying images around. three little functions, one big vibe. let's go π¦
β¨ NAME β¨
VistaIOCopyImage β copy an image π
πΈ SYNOPSIS πΈ
#include <vistaio.h>
VistaIOImage VistaIOCopyImagePixels (src, dest, band)
VistaIOImage src, dest;
VistaIOBand band;
VistaIOImage VistaIOCopyImageAttrs (src, dest)
VistaIOImage src, dest;
VistaIOImage VistaIOCopyImage (src, dest, band)
VistaIOImage src, dest; VistaIOBand band;
π ARGUMENTS π
srcβ this is the source image, the one you're copying from. the main character we're all obsessed with.destβ may specify a destination image, OR may beNULLto say "bestie, idk, just make me a new destination image." no pressure either way πbandβ may specify a particular band of the source image that you wanna copy, OR it can be the constantVistaIOAllBands, which means "yeah girl, copy every single band." π
π DESCRIPTION π
VistaIOCopyImagePixels copies pixel values from the source image over to the destination image. that's it. that's the whole thing. (no other image properties are copied, okay? just pixels. periodt.)
VistaIOCopyImageAttrs copies attributes from the source image to the destination image. (no pixel values are copied β she does NOT do pixels, that's not her job.) and here's the tea: if the destination image already has an attribute list, it gets deleted first. gone. then the destination image gets a copy of the source image's attribute list. and finally, if the source and destination images don't have the same number of bands, the destination image's band interpretation attributes may get edited to keep them valid:
- if they do not have the same number of bands then (a) any band interpretation attributes, such as
frame_interpandcolor_interp, are deleted from the destination image's copy; (b) the size of the destination image's component dimension (ncomponents) is set equal to its number of bands; and (c) the sizes of its other band interpretation dimensions (nframes,nviewpoints, andncolors) are set to1. it's giving fresh start, honestly π§ - if they do have the same number of bands then (a) all attributes are copied unchanged from the source image to the destination image; and (b) the sizes of the band interpretation dimensions are copied as well. iconic, no notes π
VistaIOCopyImage copies both pixel values and attributes from one image to the other. it's literally equivalent to calling both VistaIOCopyImagePixels and VistaIOCopyImageAttrs. the full package. the whole meal. π
you can specify NULL as a destination image for any of these routines; they'll then create an appropriate destination image, copy to it, and return it. so easy, so slay.
β οΈ but if you do supply a destination image toVistaIOCopyImageorVistaIOCopyImagePixels, it must have the same number of rows, number of columns, and pixel representation as the source image; also, it must have a number of bands consistent withsrcandband. no exceptions bestie, the vibe check is strict π
β RETURN VALUES β
each of these routines returns the destination image if it's successful, and NULL otherwise. succeed and return, or fail and hand you a NULL. simple as. π
π¦ SEE ALSO π¦
VistaIOCopyBand(3), VistaIOCombineBands(3) VistaIOImage(3),
πΈ NOTES πΈ
VistaIOAttrList(3) β wait no, hold on β VistaIOCopyAttrList(3) is used to copy attributes from the source image to the destination image. so the destination image's attribute list contains its own copy of each attribute value β except that for a VistaIOPointer value, the pointer is copied but not the (opaque) data structure to which it points. so like, the address gets a copy, but the thing living at that address does not. no cap. π
π₯ DIAGNOSTICS π₯
Band band referenced in image of nbands band(s).'' `` β thebandargument is invalid given the number of bands insrc.Destination image has dest_nbands bands; src_nbands expected.'' `` β a destination image was specified but it has the wrong number of bands. ifbandisVistaIOAllBands, the destination image must have the same number of bands as the source image. otherwise, it must have a single band.Destination image has dest_prop property; src_prop expected.''β property is one ofpixels'',rows'', orcolumns''. a destination image was specified but it does not have the same pixel representation, number of rows, and number of columns as the source image.
π AUTHOR π
- Art Pope <pope@cs.ubc.ca>
- Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
and that's the whole page, bestie π«Ά shoutout to VistaIO Version 1.2.14, dated 24 April 1993 β yeah she's vintage but she still ate πβ¨π
π¦ 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