Click here to Skip to main content
15,900,589 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
converting from gray to RGB in java

1 solution

when you keep R=G=B you get all shades of gray, from black to white. So all it takes is turning a gray value (you did not specify its resolution) to an equivalent number (with fewer or more relevant bits, you did not specify the output resolution either), then assigning that to the three color components.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900