]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
Made wxGTK compile and link again. Broke wxMSW a little.
[wxWidgets.git] / src / common / image.cpp
index 3679c78d0377ece78988b8a3e4a9be95072ca5b2..05344a678fc2f928c108393d1b2af8623b8988dd 100644 (file)
@@ -437,8 +437,32 @@ bool wxImage::SaveFile( const wxString& filename, const wxString& mimetype )
         return FALSE;
 }
 
+bool wxImage::CanRead( const wxString &name )
+{
+#if wxUSE_STREAMS
+  wxFileInputStream stream(name);
+  return CanRead(stream);
+#else
+  return FALSE;
+#endif
+}
+
 #if wxUSE_STREAMS
 
+bool wxImage::CanRead( wxInputStream &stream )
+{
+  wxList &list=GetHandlers();
+  
+  for ( wxList::Node *node = list.GetFirst(); node; node = node->GetNext() )
+    {  
+      wxImageHandler *handler=(wxImageHandler*)node->GetData();
+      if (handler->CanRead( stream ))
+       return TRUE;
+    }
+
+  return FALSE;
+}
+
 bool wxImage::LoadFile( wxInputStream& stream, long type )
 {
     UnRef();