lvdither(3)

LIBRARY ROUTINE
lvdither - Perform dithering using ordered (matrix) technique.

LIBRARY CALL
#include "vinclude.h"
lvdither(image, type)
struct xvimage *image;
int  type;

INPUT

image
    xvimage structure containing the character image to be dithered.

type
    an integer flag indicating the type of dithering (matrix) technique desired.

OUTPUT

image
    holds the result of the dithered image.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS
Marcelo Teran (1/11/88) Converted to new xvstruct.
Mark Young (5/9/88) Changed bitmap padding from 16 to 8 bits.

DESCRIPTION
vdither performs 5x5 ordered dithers. These dithers provide a reasonable compromise between grey levels and spatial resolution.

image is a pointer to a Khoros image structure containing the character image to be dithered. image is also used to hold the result of the dithered image. This is done to save space, but you must be careful not to overwrite important data.

type is an integer flag used for indicating the type of dithering (matrix) technique desired. The two types of matrices supported are Star (1) and Box (2).

lvdither returns a value of one upon success and a zero on failure.

SEE ALSO
vdither(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
lvdither operates only on BYTE images.

AUTHOR
Scott Wilson

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.