]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagpnm.cpp
Added new wxFontDialog,
[wxWidgets.git] / src / common / imagpnm.cpp
index ffbd4c1bd4ce898640705ab0754299f045278e74..e46916c549379feb82e1ca647af31d9ec55e97e7 100644 (file)
@@ -136,6 +136,25 @@ bool wxPNMHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool WXUNUS
     return (stream.LastError()==wxStream_NOERROR);
 }
 
+bool wxPNMHandler::CanRead( wxInputStream& stream )
+{
+    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;
+}
+
+
 #endif // wxUSE_STREAMS