* Read the PNM header
*/
- wxTextInputStream text_stream(stream);
+ wxBufferedInputStream buf_stream(stream);
+ wxTextInputStream text_stream(buf_stream);
- Skip_Comment(stream);
- if (stream.GetC()==_T('P')) c=stream.GetC();
+ Skip_Comment(buf_stream);
+ if (buf_stream.GetC()==_T('P')) c=buf_stream.GetC();
switch (c)
{
}
text_stream >> line; // for the \n
- Skip_Comment(stream);
+ Skip_Comment(buf_stream);
text_stream >> width >> height ;
- Skip_Comment(stream);
+ Skip_Comment(buf_stream);
text_stream >> maxval;
//cout << line << " " << width << " " << height << " " << maxval << endl;
return FALSE;
}
- wxBufferedInputStream buf_stream(stream);
-
if (c=='3') // Ascii RBG
{
wxUint32 value, size=3*width*height;