/*
Bryce Getsinger
CPSC 1011, Section 004, 11/13/2022
Lab 10B, a lab which compresses an HD prohograph using pointers,
structures, and functions in a multi-file program.
*/

#include "defs.h"

void fillImageArray(pixelInfo functionArray[], int functionWidth, int functionHeight) {

for(int i = 0; i < functionWidth * functionHeight; i++) {
	fscanf(stdin, " %i", &functionArray[i].r);	
	fscanf(stdin, " %i", &functionArray[i].g);	
	fscanf(stdin, " %i", &functionArray[i].b);	
}

/*	int i, j, k = 0;
    for (i = 0; i < functionHeight; i++) {                                             
        for (j = 0; j < functionWidth/3; j++) {                                         
           functionArray[k].r = 0;                                                            
           functionArray[k].g = 128;                                                          
           functionArray[k].b = 0;                                                            
           k++;                                                                        
        }                                                                              
        for (; j < functionWidth*2/3; j++) {                                            
           functionArray[k].r = 255;                                                          
           functionArray[k].g = 255;                                                          
           functionArray[k].b = 255;                                                          
           k++;                                                                        
        }                                                                              
        for (; j < functionWidth; j++) {                                                
           functionArray[k].r = 255;                                                          
           functionArray[k].g = 165;                                                          
           functionArray[k].b = 0;                                                            
           k++;                                                                        
        }                                                                              
     } */

}
