/*	Daniella Pokorny
	11/13/22
	CpSc 1011
	Section #7
	Lab 10
	PPM Read:Write
 */

#include "defs.h"

void halfSizeWritePixels(pixel_t *p, int height, int width){
		  for (int i=0; i< height * width/2; i++){
					p[i].r = (p[i].r + p[i+1].r)/2;
					p[i].g = (p[i].g + p[i+1].g)/2;
					p[i].b = (p[i].b + p[i+1].b)/2;
					fprintf(stdout, "%i %i %i\n", p[i].r, p[i].g, p[i].b);
			
		  }
}
	
void writePixels(pixel_t *p, int height, int width){
		  for (int i=0; i < height * width; i++){
					 fprintf(stdout, "%i %i %i\n", p[i].r, p[i].g, p[i].b);
		  }
}


