]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
added default ctor for wxDirDialog
[wxWidgets.git] / src / common / image.cpp
index 29e7087ea3619bcbc34b3d4810af5e9aed3b8fe7..5931d63cb168c253cc871c3b70ee8b25ab040109 100644 (file)
@@ -381,7 +381,8 @@ bool wxImage::LoadFile( const wxString& filename, long type )
     if (wxFileExists(filename))
     {
         wxFileInputStream stream(filename);
-        return LoadFile(stream, type);
+       wxBufferedInputStream bstream( stream );
+        return LoadFile(bstream, type);
     }
     else 
     {
@@ -400,7 +401,8 @@ bool wxImage::LoadFile( const wxString& filename, const wxString& mimetype )
     if (wxFileExists(filename))
     {
         wxFileInputStream stream(filename);
-        return LoadFile(stream, mimetype);
+       wxBufferedInputStream bstream( stream );
+        return LoadFile(bstream, mimetype);
     }
     else 
     {
@@ -419,7 +421,10 @@ bool wxImage::SaveFile( const wxString& filename, int type )
     wxFileOutputStream stream(filename);
 
     if ( stream.LastError() == wxStream_NOERROR )
-        return SaveFile(stream, type);
+    {
+       wxBufferedOutputStream bstream( stream );
+        return SaveFile(bstream, type);
+    }
     else
 #endif // wxUSE_STREAMS
         return FALSE;
@@ -431,7 +436,10 @@ bool wxImage::SaveFile( const wxString& filename, const wxString& mimetype )
     wxFileOutputStream stream(filename);
 
     if ( stream.LastError() == wxStream_NOERROR )
-        return SaveFile(stream, mimetype);
+    {
+       wxBufferedOutputStream bstream( stream );
+        return SaveFile(bstream, mimetype);
+    }
     else
 #endif // wxUSE_STREAMS
         return FALSE;
@@ -684,7 +692,7 @@ bool wxImageHandler::CanRead( const wxString& name )
 
         return FALSE;
     }
-    return FALSE;
+//    return FALSE;
 }
 
 #endif // wxUSE_STREAMS