75 fprintf(stderr,
" Compiled without libpng, zlib or PBMPLUS/NetPBM.\n");
83 static uch ppmline[256];
89 fgets(ppmline, 256, infile);
90 if (ppmline[0] !=
'P' || ppmline[1] !=
'6') {
91 fprintf(stderr,
"ERROR: not a PPM file\n");
95 if (ppmline[1] ==
'6') {
98 }
else if (ppmline[1] ==
'8') {
107 fgets(ppmline, 256, infile);
108 }
while (ppmline[0] ==
'#');
112 fgets(ppmline, 256, infile);
113 }
while (ppmline[0] ==
'#');
114 sscanf(ppmline,
"%d", &maxval);
116 fprintf(stderr,
"ERROR: maxval = %d\n", maxval);
161 Trace((stderr,
"readpng_get_image: rowbytes = %ld, height = %ld\n", rowbytes, height));
void readpng_cleanup(int free_image_data)
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
uch * readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
void readpng_version_info()
int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
int readpng_get_bgcolor(uch *red, uch *green, uch *blue)