|
How to relate RGB to gray scale |
|
|
This Java tip explains how to relate RGB to gray scale. In the MIDP
reference implementation, the mapping from grayscale to the returned color
is a simple one: the red, green, and blue components are all set to
the grayscale value. That is to say, the following code prints "127"
for all three color components:
g.setGrayScale(127);
System.out.println("Red = " + g.getRedComponent( ) + ", green = " + g.
getGreenComponent( ) + ", blue = " + g.getBlueComponent( ));
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.