/*
John Severson
11/15/22
CPSC 1011 section 001
Lab 11
This program copies an image using pointers and file pointers. The program then 
shrinks the image to half its original size.
Each function is in its own file, each of those files are linked to this 
header file.
*/

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

//structure declarations
typedef struct {
   char type[3];
   int width, height, maxColor;
} header;

typedef struct {
   int r, g, b;
} values;

header getHeader(FILE *in);

header getHalfHeader();


//	Function prototypes
void writeHeader(header, FILE *out);

void fillImageArray(values p1[], int wfFA, int hfFA, FILE *in);

void writePixels(values p1[], int wWP, int hWP);

void halfSizeWritePixels(values p2[], int wHW, int hHW, FILE *out);
