Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_get_name(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_create_child(3)

xil_get_by_name(3)

NAME

xil_get_by_name, xil_get_name, xil_set_name − get and set an image object name and get a handle to an image by specifying a name

SYNOPSIS

#include <xil/xil.h>

XilImage xil_get_by_name (XilSystemState State,

char ∗name);

char∗ xil_get_name (XilImage image);

void xil_set_name (XilImage image,

char ∗name);

DESCRIPTION

Use these functions to assign names to image objects, to read an image’s name, and to retrieve image objects by name. 

xil_get_by_name() returns the handle to the image with the specified name name.  If such an image does not exist, NULL is returned.  xil_get_by_name () does not make a copy of the image.

xil_get_name() returns a copy of the specified image’s name.  A call to free (3) should be used to free the space allocated by xil_get_name()
 If the specified image has no name, NULL is returned.

xil_set_name() sets the name of the specified image to the one provided.

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Create a 5x5 3-band blank test image called "empty5x5x3":

XilSystemState State;
XilImage image;
float values[] = { 0.0, 0.0, 0.0 };
image = xil_create(State,5,5,3,XIL_BYTE);
xil_set_value(image, values);
xil_set_name(image, "empty5x5x3");

Use an image named "empty5x5x3" to zero a portion of another image:

XilSystemState State;
XilImage zero_image, src, src_child;
zero_image = xil_get_by_name (State,"empty5x5x3");
src_child = xil_create_child (src, 100, 100, 5, 5, 1, 3);
xil_multiply (src_child, zero_image, src_child);

NOTES

If you give two images the same name, it is not defined which image will be retrieved by a call to xil_get_by_name().

SEE ALSO

xil_create_child(3). 

SunOS 5.6  —  Last change: 17 August 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026