#include #include #define BLACK 0 #define RED 1 #define GREEN 2 #define BLUE 3 #define WHITE 4 #define WIDE 12 #define HIGH 12 #define WIDTH 16 int main(){ FILE*out; char outfile[]="/home/jlapham1/public_html/102pix.png"; gdImagePtr img; unsigned int color[5]; img = gdImageCreate(WIDE*WIDTH,HIGH*WIDTH); /* defining actual colors here, (red,green,blue) */ color[BLACK]=gdImageColorAllocate(img,0,0,0); color[RED]=gdImageColorAllocate(img,255,0,0); color[GREEN]=gdImageColorAllocate(img,0,255,0); color[BLUE]=gdImageColorAllocate(img,0,0,255); color[WHITE]=gdImageColorAllocate(img,255,255,255); int a,x,y,i,col,line,pixnum,pixnumleft; int pix[WIDE*HIGH];//the array for the picture int arrayGetTwo =0;//separate variable that essentially indexes the array with the following inner for loop //populating the array with values now for(i=0;i0){ printf("Enter the next color.\nBlack=0,Red=1,Green=2,Blue=3,White=4 : "); scanf("%d",&col); printf("There are %u pixels left in line %u.\nEnter the number of pixels for color %u : ",pixnumleft,line,col); scanf("%d",&pixnum); for(a=0;a