Question: Write a c++ program that will manipulate a ppm image when it is provided. The program should read the original image, then produce a P6

Write a c++ program that will manipulate a ppm image when it is provided. The program should read the original image, then produce a P6 image output of the transformed image, similar to the 2nd image. The transformations of the P6 output image should:

1. Resize the image from its original size of 400 width by 800 height, scaling down in increments twice. The second resize should be scaled to 200 by 400. The final resize should be 100 by 200.

One way to do this is to calculate the relative height and width to find the pixel of the original image that is closest in location to the pixel needed in the new image. The function prototype for the above solution is as follows:

void resizeImage(image_t*, image_t* );

The two image_t* parameters represent the original image and the new resized image.

2. Each scaled down increment of the original image should have a negative of the previous image.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Write a c++ program that will manipulate a ppm image when itis provided. The program should read the original image, then produce a

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!