xil_dithermask_get_values(3)
NAME
xil_dithermask_get_values - returns a copy of the internal values in a dither mask
SYNOPSIS
#include <xil/xil.h>
void xil_dithermask_get_values(XilDitherMask mask,
float∗ data);
DESCRIPTION
xil_dithermask_get_values () returns the internal values stored in mask. (See xil_dithermask_create(3) man page for a description of how the values are arranged. The user must allocate the array of float data to hold the values of the dither mask. The size of the data array will be the width of mask ∗ height of mask ∗ number of bands in mask. The width, height, and number of bands can be retrieved by calling xil_dithermask_get_width(3), xil_dithermask_get_height(3), and xil_dithermask_get_nbands(3).
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide.
EXAMPLES
Get the values of a dither mask object:
XilDithermask mask;
float∗ data;
unsigned int width;
unsigned int height;
unsigned int nbands;
/∗ process filesrc into the display ∗/
xil_lookup(filesrc, tmp1);
tmp2 = xil_create_temporary(State, width, height, nbands,datatype);
xil_convolve(tmp1, tmp2);
xil_ordered_dither (tmp2, display);
width = xil_dithermask_get_width(mask);
height = xil_dithermask_get_height(mask);
nbands = xil_dithermask_get_nbands(mask);
data = malloc(width∗height∗nbands∗sizeof(float));
if(data == NULL)
/∗ cleanup and exit ∗/
}
xil_dithermask_get_values(mask, data);
NOTES
The values returned in data are copies of the internal values. The only way to alter the internal values are to create a new mask.
SEE ALSO
xil_dithermask_create(3), xil_dithermask_get_width(3), xil_dithermask_get_height(3), xil_dithermask_get_nbands(3).
SunOS 5.6 — Last change: 10 February 1997