Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_create(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_create_child(3)

xil_create_copy(3)

xil_create_from_device(3)

xil_create_from_type(3)

xil_create_from_window(3)

xil_create_temporary(3)

xil_create_temporary_from_type(3)

xil_destroy(3)

xil_set_roi(3)

xil_get_roi(3)

xil_get_info(3)

xil_get_state(3)

xil_set_value(3)

xil_get_origin(3)

xil_set_origin(3)

xil_set_colorspace(3)

xil_create(3)

NAME

xil_create − create an image

SYNOPSIS

#include <xil/xil.h>

XilImage xil_create(XilSystemState State,

unsigned int width,
unsigned int height,
unsigned int nbands,
XilDataType datatype);

DESCRIPTION

This routine creates an image with the specified dimensions and data type.  width is the width (extent in x ) of the image.  height is the height (extent in y ) of the image.  nbands is the number of bands in the image.  datatype is the data type of the image, which can be one of the following enumeration constants of type XilDataType:

XIL_BIT 1-bit

XIL_BYTE unsigned 8-bit

XIL_SHORT signed 16-bit

XIL_FLOAT 32-bit IEEE floating point

If the function is successful, an opaque handle to the image is returned.  Access to the image’s data is available through the storage interfaces described by xil_storage_create (3). 

The data associated with the image is not automatically zeroed.  Use xil_set_value(3) to do this. 

Images contain no data until they are used in an operation, their storage is requested by the application or their storage is set by the application.  At creation time, XilImages are structures describing attributes of the image. 

ROI Behavior

The default ROI is NULL.  If an ROI is NULL, operations are performed on the entire image. 

XIL Images

The primary objects in the XIL world are images.  Each dimension of an image - width, height, or number of bands - may be as great as 2^32 (4,294,967,296), except that the overall size of an image is limited by available resources and the addressing capabilities of the computer’s architecture. 

Four data precisions are supported: 1-bit, 8-bit unsigned, 16-bit signed and 32-bit floating point per data element. 

The exposed attributes associated with images are width, height, nbands (number of bands -- number of distinct data elements per pixel), datatype (sample type -- precision of a single data element), color space, and image origin.  You can get width, height, nbands, and datatype with xil_get_info(3) amd xil_get_origin(3).  Note that the origin at creation time is the upper left corner of the image (0.0, 0.0).  Also note that an image’s color space is NULL upon creation. 

The XIL library currently has no provision for direct operation on  images with bands of different data types or different dimensions.  This implies no direct support for 4:1:1 or 4:2:2 data. 

ERRORS

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

EXAMPLES

Create a 640x480 8-bit image with 3 bands, which can contain 8-bit unsigned data:

XilSystemState state;
XilImage       image;
image = xil_create(state, 640, 480, 3, XIL_BYTE);
 if(image == NULL) {
    fprintf(stderr, "Image creation failed.\n");
    return XIL_FAILURE;
}

SEE ALSO

xil_create_child(3), xil_create_copy(3), xil_create_from_device(3), xil_create_from_type(3), xil_create_from_window(3), xil_create_temporary(3), xil_create_temporary_from_type(3), xil_destroy(3), xil_set_roi(3), xil_get_roi(3), xil_get_info(3), xil_get_state(3), xil_set_value(3), xil_get_origin(3), xil_set_origin(3), xil_set_colorspace(3). 

SunOS 5.6  —  Last change: 12 August 1993

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