Question: Write a C++ program to display an image, which is just ASCII art, and give some options to manipulate it. Present a menu to the

Write a C++ program to display an image, which is just ASCII art, and give some options to manipulate it. Present a menu to the user for this program. The menu should look like the following, and should be displayed until the user chooses to exit the program:

Welcome to TxPaint

[1] Load image

[2] Draw line in image

[3] Save image

[4] Exit

Option 1 - Program should load an image from a file. The filename can be hard-coded, so you dont have to prompt the user for this information. Load this image into a single-dimensional array and display the image to the screen.

Option 2 - Prompt the user to choose either a vertical or horizontal line. Using the image loaded in add the line either horizontally or vertically and display the altered image. If the image is not already loaded, load it first. The line should be displayed halfway across the image. For vertical lines, use the pipe | character, and for horizontal lines, use the dash - character.

Option 3 - Save the image that is currently stored in memory to a file. Save with a new filename such as image-new.asc so you dont overwrite the original image that may be loaded if the user chooses one of the options again.

Option 4 - Exit the program

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!