For this assignment, you will be working with images represented by pixel maps. Inside the directory ~miller/cs231/hw1, you will find a collection of files that use the Image class to implement a simple program that reads in an image file and displays a black and white image using ASCII characters. Your assignment will be to extend the Image class and create a user-friendly menu-driven program for manipulating, displaying and saving images.
Also in the hw1 directory are several pixelmap files, each having a img suffix. The have the following format:
The display member function currently presents a black and white image. However, because some ASCII characters use more "ink" than others, it is possible to display pixels with more gradation. Referencing the DISPLAY_CHARS constant defined in image.h, modify the Display function so the image is displayed with grayscale characters. The characters listed first in DISPLAY_CHARS should represent light pixels whereas the last characters in the string should represent dark pixels. You may want to experiment with the contents and length of DISPLAY_CHARS to achieve the best quality display.
Extend the Image class so that it has the following member functions:
Furthermore, you should create a user-friendly menu-driven program that uses your extended Image class. Your goal is to manipulating and displaying the image as easy as possible for the user.