diff --git a/src/common/imagpnm.cpp b/src/common/imagpnm.cpp index d2b3244965..e46916c549 100644 --- a/src/common/imagpnm.cpp +++ b/src/common/imagpnm.cpp @@ -138,7 +138,20 @@ bool wxPNMHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool WXUNUS bool wxPNMHandler::CanRead( wxInputStream& stream ) { - return FALSE; // VS - temporary - FIXME + off_t pos=stream.TellI(); + + Skip_Comment(stream); + + if (stream.GetC()==_T('P')) + switch (stream.GetC()) + { + case _T('3'): case _T('6'): + stream.SeekI(pos); + return TRUE; + } + + stream.SeekI(pos); + return FALSE; }