Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FILE *fp = fopen("feep.pgm", "r");
- int ch = getc(fp);
- // int i;
- int header [3];
- // Pnm_ppm myImage;
- // NEW(myImage);
- // myImage->width = 10;
- // (*myImage).width = 10;
- while (!feof(fp)) {
- putchar(ch);
- ch = getc(fp);
- fscanf (fp, "%d", header);
- printf("\nHeader Values: %d, %d, %d\n", header[0], header[1], header[2]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement