I have still a problem with saving a gray image with Java. How could I do this?
The format is not so important, but there should be no image compression.
Does anyone know that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This may not be the most elegant method, but it will work:
The colorValue is composed of r, g, and b (b on the lowest byte, g one before that, and r one before that). Since your image is greyscale, you can simply use the same r, g and b values for your image, so that’s why you can simply do: