]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagbmp.cpp
Added German translation to internat sample.
[wxWidgets.git] / src / common / imagbmp.cpp
index 40c0f1451286405343931f9bc131179a670af61e..005e007dfa77c0523504dbac344423ce13ca66ce 100644 (file)
@@ -64,7 +64,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler)
 
 #define poffset (line * width * 3 + column * 3)
 
-bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream )
+bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSED(verbose) )
 {
     int             rshift = 0, gshift = 0, bshift = 0;
     wxUint8         aByte;
@@ -401,6 +401,15 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream )
      return TRUE;
 }
 
+bool wxBMPHandler::CanRead( wxInputStream& stream )
+{
+    unsigned char hdr[2];
+    
+    stream.Read(&hdr, 2);
+    stream.SeekI(-2, wxFromCurrent);
+    return (hdr[0] == 'B' && hdr[1] == 'M');
+}
+
 #endif // wxUSE_STREAMS