Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using i mage_mod.cpp from Module 8.6 Code Examples as a basis, write a program,

ID: 3716984 • Letter: U

Question

Using image_mod.cpp from Module 8.6 Code Examples as a basis, write a program, gray_scale.cpp, that edits an image file, turning it into grayscale. (You can use high_sierra.bmp, also from Module 8.6 Code Examples, or replace it with one of your own.)

Replace each pixel with a pixel that has the same grayness level for the blue, green, and red components. The grayness level is computed by adding 30 percent of the red level, 59 percent of the green level, and 11 percent of the blue level. (The color-sensing cone cells in the human eye differ in their sensitivity for red, green, and blue light.)

Explanation / Answer

But if by "bitmap" you really meant a bitmap (that is, a raw image file with nothing but uncompressed pixel data), it's rather easy:

But if by "bitmap" you really meant a bitmap (that is, a raw image file with nothing but uncompressed pixel data), it's rather easy:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote