#include "defs.h"

/*
John Severson
11/15/22
CPSC 1011 section 001
Lab 11
This program copies an image using pointers and file pointers. It then shrinks
the image to one half of its original size. Uses file pointers declared in 
the mainDriver that are used to read and write input and output to different
files.
*/



//fills array with pixel values
void fillImageArray(values p1[], int wfFA, int hfFA, FILE *in) {
	
	int j = 0;

	for (j = 0; j < wfFA*hfFA; j++) {
//scans from input file for pixel values
//in is the file pointer, pointing to the input file
        fscanf(in, "%i", &p1[j].r);
		  fscanf(in, "%i", &p1[j].g);
		  fscanf(in, "%i", &p1[j].b);
	}  
}


