Copying header of a .pgm file

96 views Asked by At

I have been getting an error when trying to copy the header of a pgm to another. could someone please tell me where i'm wrong?

    FILE *infile;
infile = fopen(fin, "rb");
fscanf(infile, "%s %d %d %d\n",&type,&u,&v,&depth);

FILE *outfile;
outfile = fopen(fout, "wb");    
fprintf(outfile, "%s %d %d %d\n",&type,u,v,depth);  
0

There are 0 answers