Question: Write a code in C. Avoid comments. (2t) picture array contains data representing a bitmap image. Each element of the array represents a pixel of

Write a code in C. Avoid comments. Write a code in C. Avoid comments. (2t) picture array contains data

(2t) picture array contains data representing a bitmap image. Each element of the array represents a pixel of the image. The image is grayscale encoded where the values of each pixel range from 0 (representing black) to 255 (representing white), with intermediate values representing different levels of gray. The following is an example of an image and the corresponding data values for the picture array. Bitmap lmage A method, Lighten(), is required to lighten the image. Lightening an image may cause it to "burnout". An image is said to be "burnt out if any pixel is set to the maximum value 255. The function Lighten() will: - Increase the value of each pixel by 10%. - Return 1 if the resultant image is 'burn out', else 0. a) Implement the Lighten() function. b) Implement a function display(), which displays the values of the matrix after implementing the Lighten() method. c) Your program should take initial inputs for all pixels in MN matrix while handling odd inputs / exceptions. Exception is a case where the entered pixel value is less than 0 and greater than 255

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!