Commands Used with the IMGCTRL, IMGOP and PICFILL Functions |
Syntax | |
Details | |
Example |
Syntax |
rc=IMGOP(task-id, 'GENERATE_CMAP', COLORRAMP, reds, greens, blues); |
rc=IMGOP(task-id, 'GENERATE_CMAP', GRAYRAMP, n); |
Details |
GENERATE_CMAP generates two kinds of color maps:
is a color ramp of RGB colors that fill the RGB color spectrum, given the desired number of red, green, and blue shades to use. This command generates a color map of reds×greens×blues colors, with a maximum of 256 colors allowed. It is possible to generate a color map that consists only of reds, greens, or blues by specifying that only one shade be used for the other two colors.
is a color map that consists only of grays. The number of shades of gray is limited to 256.
After the color map is generated, it can be applied to an image with either the DITHER command or the MAP_COLORS command.
Example |
Use the GENERATE_CMAP command to generate a color ramp and a gray ramp, each containing 100 color map entries:
gray: rc=imgop(task-id,'GENERATE_CMAP','GRAYRAMP',100); return; color: rc=imgop(task-id,'GENERATE_CMAP','COLORRAMP',5,5,4); return;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.