/* Emma Gifford
	CPSC 1011-002
	Lab 10A
	11-01-22
   Program that reads in HEX colors to create a Disney image
	Uses functions, structs, pointers and loops to create the image
*/

#include "defs.h"

int main() {

	header picture;

	picture = getHeader();

	pixel *memoryPtr;
	
	memoryPtr = (pixel *)calloc((picture.width * picture.height), sizeof(pixel));
	
	if (memoryPtr == NULL) {
		printf("Unable to allocate array. Exiting program.\n");
		exit(1);
	}

	writeHeader(picture);

	fillImageArray(memoryPtr, picture.width, picture.height);

	writePixels(memoryPtr, picture.width, picture.height);

	return 0;
}
