Question: Description : You need to implement a program to generate two different sized images for an input color image, in which one is reduced to

Description : You need to implement a program to generate two different sized images for an input color image, in which one is reduced to a quarter size and the other is enlarged to 4 times. For example, if the input image is 100 x 100 pixels, then your program needs to generate 50 x 50 pixel image, and 200 x 200 pixel image.

o Input : The following value from keyboard.

Input image file name (square and even-numbered size, and .ppm format (P6)). o Your program needs to do the following basically:

Get input value above.

Perform ReadPPM for input image. Perform CreatPPM for two output images. Initialize all pixel values of output images as white (255),

Perform an image reduction function, and put its results into the output image created by CreatPPM above using PutRPixel, PutGPixel, and PutBPixel. Perform an image enlargement function, and put its results into the output image created by CreatPPM above using PutRPixel, PutGPixel, and PutBPixel.

Your image reduction and enlargement functions should generate a reasonable quality.

Perform WritePPM for two output images. o Output : two output image files(.ppm format, i.e., small.ppm and large.ppm) asresults of image reduction and enlargement.

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!