git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3520
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- //#include <stream.h> // for cout
+//#include <stream.h> // for cout
void Skip_Comment(wxInputStream &stream)
{
void Skip_Comment(wxInputStream &stream)
{
- wxBufferedInputStream buf_stream(stream);
- wxTextInputStream text_stream(buf_stream);
+ wxTextInputStream text_stream(stream);
- Skip_Comment(buf_stream);
- if (buf_stream.GetC()==_T('P')) c=buf_stream.GetC();
+ Skip_Comment(stream);
+ if (stream.GetC()==_T('P')) c=stream.GetC();
}
text_stream >> line; // for the \n
}
text_stream >> line; // for the \n
- Skip_Comment(buf_stream);
text_stream >> width >> height ;
text_stream >> width >> height ;
- Skip_Comment(buf_stream);
- //cout << width << " " << height << " " << maxval << endl;
+ //cout << line << " " << width << " " << height << " " << maxval << endl;
image->Create( width, height );
unsigned char *ptr = image->GetData();
if (!ptr)
image->Create( width, height );
unsigned char *ptr = image->GetData();
if (!ptr)
- if (c=='3') // Ascii RBG
+ wxBufferedInputStream buf_stream(stream);
+
+ if (c=='3') // Ascii RBG
{
wxUint32 value, size=3*width*height;
for (wxUint32 i=0; i<size; ++i)
{
wxUint32 value, size=3*width*height;
for (wxUint32 i=0; i<size; ++i)