//Eli Skoglund
//CPSC1010-04
//lab 11
//11/18/2022
/*program to read an image with redirection into a dynamically allocated memory, and writes it back out to an image file that is half the size, also using a file pointer*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct header {
	char type[3];
	int width, height, maxColor;
}header_t;

typedef struct pixel{
	unsigned int r, g, b;
}pixel_t;

header_t getHeader(FILE * FileIn);
void writeHeader(FILE * FileOut, header_t Header);
void fillImageArray(FILE * FileIn, pixel_t *array, int k);
void writePixels(FILE * FileIN, pixel_t * array, int w, int h);
