Commands Used with the IMGCTRL, IMGOP and PICFILL Functions |
Reduces the number of colors used for an image
rc = IMGOP(task-id, 'QUANTIZE',
colors);
|
region-id=PICFILL(graphenv-id, type, ulr, ulc,
lrr, lrc, source<, 'QUANTIZE'<,
arguments>>);
|
-
colors
-
is the number of colors to use for the image.
The value of the colors variable must be between
2 through 256.
Type: Numeric
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))
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);
FOOTNOTE 1:
![[arrow]](../../../../common/64368/HTML/default/images/fntarrow.gif)
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.