Write a method grayscale that converts a color image into a blackand-white image. This is done by
Question:
Write a method grayscale that converts a color image into a blackand-white image. This is done by averaging the red, green, and blue components of each pixel. For example, if a pixel has RGB values of (red = 100, green = 30blue = 80), the average of the three components is (100 + 30 + 80) /3 = 70, so that pixel becomes (red = 70, green = 70, blue = 70).
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: