Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_add_const(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

xil_add(3)

NAME

xil_add, xil_add_const − image addition operations

SYNOPSIS

#include <xil/xil.h>

void xil_add (XilImage src1,

XilImage src2,
XilImage dst);

void xil_add_const (XilImage src1,

float ∗constants,
XilImage dst);

DESCRIPTION

xil_add () performs a pixel-by-pixel addition of the src2 image to the src1 image and stores the result in the dst (destination) image.  If the result of the operation is out of range for a particular data type, the result is clamped to the minimum or maximum value for the data type.  Results for XIL_BYTE operations, for example, are clamped to 0 if they are less than 0 and 255 if they are greater than 255. 

xil_add_const () performs a pixel-by-pixel addition of the constants values to the src1 image and stores the result in the dst (destination) image.  For an n-band image, n float values must be provided, one per band.  Pixel values are rounded and clipped according to the image data type. 

ERRORS

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

EXAMPLES

Add image2 to image1 and store the result in dst :

XilImage image1, image2, dst;
xil_add(image1, image2, dst);

Add constants to 4-band image1 and store the result in dst :

XilImage image1, dst;
float constants[4];
constants[0] = 1.0;
constants[1] = 1.0;
constants[2] = 1.0;
constants[3] = 0.0;
xil_add_const(image1, constants, dst);

NOTES

Source and destination images must be of the same data type and have the same number of bands.  In-place operations are supported. 

SunOS   —  Last change: 3 August 1993

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