/*
Karinna Thompson
Nov 13, 2022
CpSc 1010
Sec 002
Lab 10
Reading and Writing image files using redirection 

This program will determine height and width from the input from the user. Structures will be included. The output will be written to a ppm file using redirection and an image will be displayed. 
*/

#ifndef DEFS_H
#define DEFS_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef struct {

char type[4];
int width, height, maxColor;

}header;

typedef struct {

unsigned int r, g, b;

}pixel;

 
header getHeader();
void writeHeader(header);
void fillFlagArray(pixel Flag[],int width,int height);
void writePixels(pixel Flag[],int width,int height);
void halfSizeWritePixels(pixel picture[], int width, int height);

#endif
