Question: C++ Coding Activity A) Given a png image, rotate the image 180 degrees clockwise! An example image of Batman is provided, but any image should

C++ Coding Activity

A) Given a png image, rotate the image 180 degrees clockwise! An example image of Batman is provided, but any image should work.

Notes

Approximately 10 lines of code Make sure the Batman image is saved to your Debug folder in Codelite Use the .write command to save your image

Program Inputs Enter a filename:

The user will always enter a valid filename.

Program Outputs

Save the new image as BatmanRotated.png to your computer!

B)

Create an image that is 601 pixels tall and 601 pixels wide that has a circle of radius 250 pixels drawn in the center. Allow the user to pick the color of circle but the background color must be peach puff.

Notes

Approximately 11 lines of code

Use the circle equation: (x xo)2 + (y yo)2 = r2 to determine which pixels are inside the circle

Program Inputs Enter circle color:

The user will always enter 3 whole numbers for the rgb color Program Outputs

Save the new image as Circle.png to your computer!

Test Case 1:

 Enter circle color: 0 0 255 

Test Case 2:

 Enter circle color: 255 215 0 

C)

Starting from a blank image that is 800 by 800 pixels, create the traditional black and white checkerboard! Note there are a total of 64 squares (8 by 8) where the first square on each row alternates between black and white.

Notes

Approximately 12 lines of code Focus on only drawing the white squares since every blank image starts out black

Program Outputs

Save your new image as CheckerBoard.png

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!