DADiSP Worksheet Functions > Function Categories > Colors > GETRGB
Returns the separate RGB components of an image.
(r, g, b) = GETRGB(image)
image |
- |
An array. The input image. |
r |
- |
An array, the output red values. |
g |
- |
An array, the output green values. |
b |
- |
An array, the output blue values. |
Up to three arrays.
W1: readimage(".\data\mandrill.bmp")
(r, g, b) = getrgb(w1);
g *= 1.2;
W2: rgbimage(r, g, b);
W2 contains a new RGB image formed by increasing the green component of W1 by 20%.
An RGB image consists of three separate components of red, green and blue values. Each RGB value ranges from 0.0 to 1.0.
See RGBIMAGE to create an image from separate RGB values.
See COLORTORGB to convert a color index into separate RGB values.