/*Eli Skoglund
  CPSC 1011-04
  11/18/2022
  lab11
*/

#include "defs.h"
	

int main(int argc, char *argv[]){
	FILE * inFile;
	FILE * outFile;

	inFile = fopen(argv[1], "r");
	outFile = fopen(argv[2], "w");

	header_t header;
	header = getHeader(inFile);
	int e = header.width * header.height;
	pixel_t * pointer = (pixel_t *)malloc(e * sizeof(pixel_t));

	fillImageArray (inFile, pointer, e);
	writeHeader (outFile, header);
	writePixels (outFile, pointer, header.width, header.height);
	
	return 0;}

