//========================================================================= #define PROGRAMMER "SOLUTIONS, NoFrills" #define PROG_CODE "soln" #define COURSE "ECE-1021" #define YEAR (2003) #define TERM "Fall" #define SECTION (0) #define ASSIGNMENT "HW #7A" #define REVISION (0) #define TITLE "BMP Basics" #define SUBTITLE "Color to Black & White" #define EMAIL "wbahn@eas.uccs.edu" #define FILENAME "07a0soln.txt" //========================================================================= // PROBLEM: // // Write a program that allows opens a BMP file and copies it to a new // file while converting it to B&W using the RMS method. // 1) TASK: Get input file name from User // 2) TASK: Get output file name from User // 3) TASK: Open and Verify both BMP files // 4) TASK: Read Header Data from input BMP file // 4.1) TASK: Read File Header // 4.1) TASK: Read Info Header // 5) TASK: Check Header data for compatibility // 6) TASK: Write Header Data to output BMP file // 6.1) TASK: Write File Header // 6.2) TASK: Write Info Header // 7) TASK: Copy data from input to output while converting to grayscale // 7.1) TASK: Move to start of Pixel Data in Both Files // 7.2) TASK: Print out image size and number of pixels // 7.3) TASK: Read/Convert/Write image pixel-by-pixel // 7.4) TASK: Print out exported image size and number of pixels // 8) TASK: Final Housekeeping