Alternate SW Project
Deliverables: 3 programs Program 1: Drawing Program (Image Creation) When run, a window opens up. In that window we can paint pixels under the mouse to Black when Right Mouse Button is held pressed. Before any pixels are painted, we should be able to specify the width and height of the picture (both between 0010-1024). The deafult width and height are 50. The name of the exe has to be imgCr.exe. This program should be able to save the image in readable format (8b/pix) as well as packed format (1b/pix). When the image is saved in the 8b/pix format, the file extension has to be .rdb. The packed format uses .pck extension. The .rdb format contains the width and then the height of the image as 4-digit decimal numbers (each digit as an ASCII character). The .pck format contains each of width/height as a 10b number, where the actual value is one plus that number. That is to say that 1023 signifies a width or height of 1024. Program imgCr should also be able to load .rdb and .pck files and allow their modification. Program 2: Run-Length Coding (RLC) Compressor The exe should be called rlcEnc.exe. It needs to be a console program run in a cmd window with the following command-line: > rlcen img.pck img.rlc The rlc format is as follows: [img] = [width][height][row]+ [row] = [color of first pixel in the row][run length]+ [width] = the same 10b number as in .pck. [height] = the same 10b number as in .pck. [color of first pixel in the row] = 1b number indicating the color of the first pixel in the current row. The next run has the opposite color. White is 0. Black is 1. When a number of [run legth]s sum up to the [width], then a new [row] starts, so the decompressor expects a new [color of first pixel in the row]. [run length] = a 10b number which is the actual length minus 1. Program 3: RLC Decompressor The exe should be called rlcDec.exe. It needs to be a console program run in a cmd window with the following command-line: > rlcDec img.rlc img.pck