Chapter Contents |
Previous |
Next |
QUANTIZE |
Syntax | |
Details | |
Example |
Syntax |
rc = IMGOP(task-id, 'QUANTIZE', colors); |
region-id=PICFILL(graphenv-id, type, ulr, ulc, lrr, lrc, source<, 'QUANTIZE'<, arguments>>); |
Type: Numeric
Details |
QUANTIZE acts on the currently selected image. It generates a color-mapped image for which the command assigns the values in the color map. QUANTIZE results in a very good approximation of the image, with the possible negative effect that two or more images that are quantized to the same number of colors might still use different colors for each image. (The algorithm is an adaptation of the Xiaolin Wu algorithm, as described in Graphics Gems II.(footnote 1))
Example |
Reduce the number of colors for an image to the number stored in NUMCOLOR:
if (quantize eq 1) then rc=imgop(task-id,'QUANTIZE',numcolor);
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.