Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. image text in transcribed
(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions

Question

Compute a companys profits, as reflected by its income statement.

Answered: 1 week ago