Chapter Contents |
Previous |
Next |
Image Data Model: _dither |
Syntax | |
Details | |
Example |
Syntax |
CALL SEND (object-id, '_dither', cmap-id<,option>); |
Argument | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
cmap-id | N | the identifier of the image color map that is used to reduce the number of colors in the image | ||||||||
option | C | can be set to:
|
Details |
Like the _mapColors method, _dither reduces the number of colors in an image. Unlike the _mapColors method, _dither attempts to choose colors by looking at pixels in groups, not as single pixels, and tries to choose groups that result in the appropriate color. This is similar to the half-toning algorithm used by print vendors to show multiple colors using only four ink colors. This method is much more computationally expensive than the other color reduction methods, but creates crisper continuous-tone images.
Example |
This example dithers an image to 128 shades of gray:
call send (cmap_id, '_generateGrayRamp', 128); call send (imgdat_id, '_dither', cmap_id);
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.